SQL Pass-Through DB2 "WITH" Query conversion to Oracle

Reply
Occasional Contributor
Posts: 5

SQL Pass-Through DB2 "WITH" Query conversion to Oracle

Hello!

I use the WITH statement in DB2 pass-thru sql to create a series temporary tables in order to get all the data I need for my pass-thru join. These tables are deleted when the query closes and are therefore not traditional temporary tables where I create from the SAS side and load with data from SAS. This query needs to be converted to Oracle as they are swapping out their old DB2 database. What is the equivalent Oracle syntax for the WITH statement in order to make a series of tables within my pass-through query that I can all join together while still in-database? I attached a sample of the code that I wrote for DB2 that needs the Oracle equivalent syntax.

Thank you!!

michael

Attachment
PROC Star
Posts: 1,167

Re: SQL Pass-Through DB2 "WITH" Query conversion to Oracle

Hi, mrainer

Looking at your request, I believe your question pertains completely to the SQL syntax for DB2. Based on this, I suggest that you pursue this with IBM and Oracle.

While SAS users connect to DB2 and Oracle, we aren't necessarily experts on the implications of the SQL dialects that they provide. I think that your best course of action is to get your query working in native Oracle, and then using it with SAS should be very straightforward.

Tom

Ask a Question
Discussion stats
  • 1 reply
  • 380 views
  • 0 likes
  • 2 in conversation