Hi,
I am new to SAS and still learning. While running a job in SAS DI Studio, I am getting error "ERROR: Prepare error: Commands out of sync; you can't run this command now SQL statement: ". I am using SAS DI Studio 4.9.
Please provide any suggestions.
Thanks
Alka
Hi Alka,
Good for you to embark on the DI Studio journey! Good luck and let us know if we van help.
The message you give seems to come from some database management system. It sounds like mySQL. It could be that DIS is not necessarily the cause but some system configuration issue is at play. To know for sure we would have to see the entire log with all your code in it. Even just the SQL statements would probably not be enough. Could you provide us with that? Enter the log lines with code markup by clicking on the running man icon and pasting it in the window that appears.
Regards,
- Jan
Hi Jan,
Thanks for the reply. I have attached the log lines for reference. Please check and let me know.
Regards,
Alka
If you've got that much code/log to share then better copy it into a .txt file and attach this file here.
Not sure why MYSQL throws this error but as a first measure: Convert all your views to tables (just right-click on the green tables from the extract transformations and un-select "create as view").
The reason I'm asking for this: Views get only executed when used and though any issues occurring in a view only appear in the place where you use this view. This makes debugging much harder.
Can you please run your code with tables only and then post the log once more? Please as attachment and eventually also delete/move to an attachment all the log you've already posted.
By the way: Post DIS questions into the Data Management forum and not the SAS Studio one.
Thanks for your suggestion.
I added SASTRACE code in my job and found that the issue was coming due to an index created in one of the tables. After removing that index, the job ran successfully.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Need to connect to databases in SAS Viya? SAS’ David Ghan shows you two methods – via SAS/ACCESS LIBNAME and SAS Data Connector SASLIBS – in this video.
Find more tutorials on the SAS Users YouTube channel.