) = 0 %then %do; (assign libname) %end;-Joe On Tue, Mar 10, 2009 at 4:10 PM, Matthew Pettis < Depending on the DICTIONARY table that is being queried, this process can include searching libraries, opening tables, and executing SAS … Note: Extended attributes are not copied to tables that are created using multi-table joins or outer joins. Col_04 decimal(10,2) format=10.2 informat=10.2); I think you are mixing file name and table name. You don't need your statement %let dsname=/sas/dir_01/dir_02/table_&numshortdate; You need to define libname and have table name: I assume your table is named table_&numshortdate. so what i am trying to do is check if the table exists. Check If Column Exists In A Table Jump To Topic ↓ List Of Tables Having The Column Jump To Topic ↓ Check If Any Stored Procedure Uses The Column Jump To Topic ↓ Check If Column Exists In A Table. check if ORACLE/Netteza table exist; if exist, delete it for later creation.     select * from test1 It gets created even though the table 'test1' does not exists. The %VAREXISTS macro uses Variable functions in a data step to check if a variable exists in SAS and also returns the also variable info. SQL Server Integration Services: Only Proc SQL can address the tables directly through the dictionary libname. ): SQL> select * from mytable where rownum=1; At bare minimum, you will get a response of "0 rows selected" which means the table exists, but there is no data in the table. Dates and Times” - aka Derek Morgan - review graphing with intervals, projecting dates with INTNX and calculating intervals with the INTCK function. So it is better to check the table existence before you create it. i figured it was going to be that but i wasn't sure where to set the lib up for sure. Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type. This implies that in the DICTIONARY.CATALOGS table, you won't be able to find SAS-supplied formats, only user defined formats. The result of a NOT EXISTS condition is true if the subquery evaluates to zero rows. You could change the function to FILEEXIST, but then you would have to add an extension to the filename. proc datasets library=library-name kill nolist; quit; Show All Tables in a Library. proc sql; select distinct libname into :liblist separated by ' ' from dictionary.columns; quit; Then do with that what you will - using perhaps %index or %scan, for example %if %index(&liblist,) = 0 %then %do; (assign libname) %end; -Joe On Tue, Mar 10, 2009 at 4:10 PM, Matthew Pettis < APPLYING THE METHODS ON ALL DATASETS IN A LIBRARY . Find more tutorials on the SAS Users YouTube channel. When you query a DICTIONARY table, SAS gathers information that is pertinent to that table. : First, the parameters: you give the macro a filename without extension as a parameter, but also refer to the NUMSHORTDATE global macro variable in the macro. PROC FREQ 7.42 seconds PROC SQL 3.55 seconds PROC IML Ran out of memory Table 1. Is there any way stored proc creation fails if the table does not exists. If the data set exists, execute a PROC … Re: check if table exists & create if not.