DATA Step, Macro, Functions and more

Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions

Reply
Super User
Posts: 3,102

Re: SAS optimizations with MS T-SQL and robust systems/servers suggestions

[ Edited ]

NULL only has significance in SQL Server. Downloading a NULL or blank character value to SAS will only result in a blank value that can be tested with = ''.

 

Yes it is possible to use PASSTHRU to update an SQL Server table from a SAS table but to do this you need to first upload the SAS table to the database preferably as a temporary table. Note my SQL update code needs to customised to your requirements.

 

libname tempdb odbc noprompt = "server=tester;DRIVER=SQL Server Native Client 10.0;Trusted Connection=yes;DATABASE=tempdb;";

data tempdb.temptable;
  set SAStable;
run;

proc sql;
  connect to odbc (noprompt = "server=tester;DRIVER=SQL Server Native Client 10.0;Trusted Connection=yes;DATABASE=test1;");
  execute (insert into sqltable
                as select * from #temptable) by odbc;
quit;

 

 

Ask a Question
Discussion stats
  • 0 replies
  • 191 views
  • 0 likes
  • 1 in conversation