BookmarkSubscribeRSS Feed
BaharH
Calcite | Level 5

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;
1 REPLY 1
andreas_lds
Jade | Level 19

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.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 354 views
  • 0 likes
  • 2 in conversation