My first piece of code ends with disconnect from odbc; quit;
and it will write the data I selected from a server and write the final table into my personal libname
then i have to take the sys_id from this table I created and saved to my libname and then do a new odbc to the server using the sys_id to connect to the server_sys_id along with a few other columns in the server and make another table that is then saved to my libname
The sys_id in the first query pulls distinct sys_id's that have certain other filters so I end up with a 233k row table of the millions of sys_id's in the main server database. Then my goal is take the 233k distinct sys_id's and reconnect to the server via odbc to perform some other functions that I cannot perform in the first query.
I was attempting the following:
proc sql;
connect to odbc (dsn=server user=userid password=XXXX)
create table readm.test2 as select * from connection to odbc
(select
test1.sys_id,
proc_cd,
srvc_ct
from
readm.test1
left outer join server.sys_id
on test1.sys_id = server.sys_id
i also tried using
on readm.test1.sys_id
the from statement as
from
libname readm.test1
left outer join
I just cannot figure out how to do my odbc to the server as well as use the table in my libname and connect the two to create what I need.
and it will write the data I selected from a server and write the final table into my personal libname
then i have to take the sys_id from this table I created and saved to my libname and then do a new odbc to the server using the sys_id to connect to the server_sys_id along with a few other columns in the server and make another table that is then saved to my libname
The sys_id in the first query pulls distinct sys_id's that have certain other filters so I end up with a 233k row table of the millions of sys_id's in the main server database. Then my goal is take the 233k distinct sys_id's and reconnect to the server via odbc to perform some other functions that I cannot perform in the first query.
I was attempting the following:
proc sql;
connect to odbc (dsn=server user=userid password=XXXX)
create table readm.test2 as select * from connection to odbc
(select
test1.sys_id,
proc_cd,
srvc_ct
from
readm.test1
left outer join server.sys_id
on test1.sys_id = server.sys_id
i also tried using
on readm.test1.sys_id
the from statement as
from
libname readm.test1
left outer join
I just cannot figure out how to do my odbc to the server as well as use the table in my libname and connect the two to create what I need.