I want to query through a table stored on the Netezza server and generate a SAS table out of it.
Here is my query:
proc sql;
connect to odbc as odbcCon
(noprompt='Driver={NetezzaSQL}; server=xxxxxx; port=xxxxx; database=xxx; username=xxxx; password=xxxxx;');
select * from connection to odbcCon
(SELECT *
FROM SCHEMA.table1
LIMIT 100;);
quit;
It's an sql pass through. How can I generate a SAS table from the result of the query? Thanks in advance!
All you need to do is add a create table statement
proc sql;
connect to odbc as odbcCon
(noprompt='Driver={NetezzaSQL}; server=xxxxxx; port=xxxxx; database=xxx; username=xxxx; password=xxxxx;');
create table work.sastable as
select * from connection to odbcCon
(SELECT *
FROM SCHEMA.table1
LIMIT 100;);
quit;
All you need to do is add a create table statement
proc sql;
connect to odbc as odbcCon
(noprompt='Driver={NetezzaSQL}; server=xxxxxx; port=xxxxx; database=xxx; username=xxxx; password=xxxxx;');
create table work.sastable as
select * from connection to odbcCon
(SELECT *
FROM SCHEMA.table1
LIMIT 100;);
quit;
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.