Hi, I have a similar problem.
I just moved to a new company where we don't have a scratch DB on the SQl server. To surcumvent this, I used to upload my table with the primary key to the scratch DB; then connect to the DB and execute SQL on the server to join my table; then pull it to my local machine. However, as I mentioned, we don't have a scratch DB here.
I tried the above example, but it still gives me an error...i hope you can help:
/*example*/
data tableA (drop= i);
do i = 1 to 10;
sys_ID = i;
output;
end;
run;
proc sql;
connect to odbc as imaging (dsn=imaging);
create table tableB as
select *
from connection to imaging
(select *
from work.tableA as a
left join imaging.dbo.AdviceSheetAdditionalRequirements b
on a.sys_ID = b.sys_ID
)
order by a.sys_ID
;
disconnect from odbc;
quit;
The Log window says:
ERROR: CLI describe error: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name
'work.tableA'. : [Microsoft][ODBC SQL Server Driver][SQL Server]Statement(s) could not be
prepared.
... View more