Hi. In a sql data source, I want to extract a table with 4 columns with PROC SQL. But with a constrain. this constrain is a table (name: sleutel) with one column (name: sleutel2) which is stored in my laptop. This is my code. But it does not work. could you please help me?
data IA_data;
set work.sleutel;
run;
PROC SQL;
select ia.sleutel2
from IA_data ia;
CONNECT TO ODBC AS mycon (datasrc=IA_P);
select *
FROM CONNECTION TO mycon
(SELECT
column1,
column2,
column3,
column4
FROM ia_treinrit trr
where
column1 = ia.sleutel2
);
run;
DISCONNECT FROM mycon;
QUIT;
But it does not work. could you please help me?
No, we can't help you because "does not work" can mean anything. We need to see the log at least, please post it using the "insert code" function, 7th button above the textbox.
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Check out this tutorial series to learn how to build your own steps in SAS Studio.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.