Hi
I am new to SAS Viya.
I have a caslib called "X". I want to load a SQL table from another library into X with filters applied (meaning specific records from SQL only). I have this code below.
proc casutil;
load casdata="MSD" incaslib="LMENG" outcaslib="X" casout="MSDFiltered"
where="MasterClientName='XXX' and mode='Ocean' and YearQuarter='FY19Q3'";
promote;
run;
But I get an error saying the following . Any help to fix this is appreciated. Thank you.
"ERROR: Error occurred during Post Optimization.
I would start by tracing the query. See SAS Data Connector/SAS Data Connect Accelerator Logging
Hi
I read it and i think it is a syntax issue that I don't get it. I am not able to figure out what part of my Where clause is wrong. I was able to import the Full Table Called OceanRatingQueries. BUt what i really need is only when the Category says "terminal". Here is my code
proc casutil;
load casdata="OceanRatingQueries" incaslib="LMENG" outcaslib="STDOPT" casout="OceanRatingQueries";
WHERE="Category='Terminal'";
promote;
run;
You seem to have an extra semi-colon in the middle of your LOAD statement.
I have tried differen options like with and without semi colon.
When I remove the semi colon at the end of load statement i get a different error. Here is the details of it.
You had
ERROR: ERROR: [SAS][ODBC SQL Server Wire Protocol driver][Microsoft SQL Server]Incorrect syntax near the keyword 'Top'.
Now you have
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!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
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.