Dear Communities,
I need to execute a PROC SQL on a table that has a dot in its name (i.e. esign.state is the table name).
I have registered a library that preserve table names with their original names.
LIBNAME DUW ODBC DATAsrc=DUW SCHEMA=gbox;
proc sql;
create table Test_Q1 as
select * from duw.esign.state;
quit;
However, Enterprise Guide gives me the following error:
ERROR 22-322: Syntax error, expecting one of the following: a name, ;, (, ',', ANSIMISS, AS, CROSS, EXCEPT, FULL, GROUP, HAVING,
INNER, INTERSECT, JOIN, LEFT, NATURAL, NOMISS, ORDER, OUTER, RIGHT, UNION, WHERE.
ERROR 200-322: The symbol is not recognized and will be ignored.
Do you know any workaround so as to resolve the issue?
Thank you in advance,
Vasilios
Try
options validmemname=extend;
proc sql;
create table Test_Q1 as
select * from duw.'esign.state'n;
quit;
You may have to take care of upper/lowercase inside the quotes.
Try
options validmemname=extend;
proc sql;
create table Test_Q1 as
select * from duw.'esign.state'n;
quit;
You may have to take care of upper/lowercase inside the quotes.
Thank you very much @Kurt_Bremser
with the solution you provided I found out that SAS has a limitation in terms of the number of characters that can host in a character column (32767).
Therefore, I need to find a way to manipulate the string and store in SAS.
Best Regards,
Vasilios
If the table in the DBMS has VARCHAR/CHAR fields that are too large for SAS, first cast them to a shorter length in a DBMS view, which you then use as source from SAS.
@LinusH wrote:
In that case the DBA should be fired.
And not just "fired from", but "fired at".
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.
Find more tutorials on the SAS Users YouTube channel.