It worked fine.
Thanks a lot everybody.
Since you are using an insert clause, SAS may be passing the entire table to SAS for processing. I'm not familiar with SAS DI, but in foundation SAS you can use SASTRACE= options to determine where the processing is occurring.
With the sastrace option I really identified that SAS is sending two SQL statements to Oracle.
I still can not solve the problem.
How about using explicit SQL passthrough?
You are aware that the SASTRACE option shows you in the log what SQL statements SAS sends to the database to test if they are executable there. Then further down in the log it tells you which SQL actually had been sent to the database for processing.
So if you say there are 2 SQL's sent: Is this just your interpretation of the SASTRACE log messages generated or do you actually see two running SQL's on the database side?
I'm looking to the Oracle v$sqlarea view. And there are running the two SQLs.
You may want to check with tech support. In SAS there are issues when working across DB's, such as loading entire tables before processing. In a straight insert I can't see why the issue would occur.
David
if you share with us, the whole procedure code and all the sas log generated, including rhe output from sastrace, we might be able to add some more insight.
peterC
Have a look at the SAS system option DBIDIRECTEXEC
Using the option DBIDIRECTEXEC the problem persists.
It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.
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.