I have a connection in SAS to a sql server table where the table name is 'Additions_to_Aggregate$'. The quotes are part of the name. So in my SAS editor when I try to run the below in part of my code, I'm returned errors because SAS is reading it as string rather than as the table name.
proc sql;
Create Table Name_Compare as
SELECT DISTINCT a.Insured_Name, agg.Policy_Holder_Name, a.Segment
FROM MySQLLib.ADV_Portfolio_Split as a
LEFT JOIN MySQLLib.'Additions_to_Aggregate$'n.data as agg
on a.Insured_Name = agg.Policy_Holder_Name;
quit;
Is there any way to force SAS to read the table name as a literal string, or do you have any other solution ideas? I already tried renaming the table in SAS explorer but I get this error and don't know how to interpret it.
connect to sql... select * from connection to sql ( )
) but in SAS syntax environment using LIBNAME connection (MySQL
is a libname to a sql database)? – Joe