greg warnick
2007-10-03 18:23:36 UTC
Hi SAS-L,
I am connecting to a SQL Server in SAS using a LIBNAME statement that
uses an ODBC connection (System DSN) on my local computer.
libname SQLca odbc noPrompt = "driver=SQL
Server;server=JUPITER;database=dbStudy;";
Ok, no problem. I then submit the following:
proc sql ;
drop table SQLCA.endca;
drop table SQLCA.bcp;
quit ;
Ok, SAS drops the tables via ODBC, but I get a warning in my log:
WARNING: File SQLCA.bcp.DATA does not exist.
WARNING: Table SQLCA.bcp has not been dropped.
Not the end of the world, but I would prefer a cleaner log and would
like to use
IF EXIST (select * from information_schema.tables where tablename =
"BCP") DROP TABLE SQLCA.endca;
However, SAS SQL doesn't seem to support this... I can use a proc
datasets, or simply drop the table without the conditional logic, but
would prefer to:
a. use SQL for other reasons
b. not get WARNINGS in my logs.
Any suggestions?
Regards,
Greg Warnick
Fred Hutchinson Cancer Research Center
I am connecting to a SQL Server in SAS using a LIBNAME statement that
uses an ODBC connection (System DSN) on my local computer.
libname SQLca odbc noPrompt = "driver=SQL
Server;server=JUPITER;database=dbStudy;";
Ok, no problem. I then submit the following:
proc sql ;
drop table SQLCA.endca;
drop table SQLCA.bcp;
quit ;
Ok, SAS drops the tables via ODBC, but I get a warning in my log:
WARNING: File SQLCA.bcp.DATA does not exist.
WARNING: Table SQLCA.bcp has not been dropped.
Not the end of the world, but I would prefer a cleaner log and would
like to use
IF EXIST (select * from information_schema.tables where tablename =
"BCP") DROP TABLE SQLCA.endca;
However, SAS SQL doesn't seem to support this... I can use a proc
datasets, or simply drop the table without the conditional logic, but
would prefer to:
a. use SQL for other reasons
b. not get WARNINGS in my logs.
Any suggestions?
Regards,
Greg Warnick
Fred Hutchinson Cancer Research Center