Hi-
I am finding that I can't reference the "exists" column in the table dictionary.extfiles. Here's the log from my session:
25 proc sql ;
26 describe table dictionary.extfiles ;
NOTE: SQL table DICTIONARY.EXTFILES was created like:
create table DICTIONARY.EXTFILES
(
fileref char(8) label='Fileref',
xpath char(1024) label='Pathname',
xengine char(8) label='Engine Name',
modate num format=DATETIME informat=DATETIME label='Date Modified',
filesize num label='Size of File',
level num label='File Concatenation Level',
directory char(3) label='Directory?',
exists char(3) label='Exists?',
temporary char(3) label='Temporary?'
);
27
28 select fileref,
29 directory,
30 exists,
_
22
76
ERROR 22-322: Syntax error, expecting one of the following: (, SELECT.
ERROR 76-322: Syntax error, statement will be ignored.
31 temporary
32 from dictionary.extfiles ;
2 The SAS System 16:34 Wednesday, October 17, 2012
NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
33
34 quit ;
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SQL used (Total process time):
real time 0.00 seconds
cpu time 0.00 seconds
35
As you can see, the column is named "exists" as per the describe table output, but it's interpreted as the EXISTS option in the SELECT statement....
Any ideas?
Thanks,
Jed
Yup, exists is reserved, you can't use it directly. use nliteral instead: 'exists'n
Haikuo
Hello,
Exists is reserved words.you have to use literal.'exists'n
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.