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;
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.