BookmarkSubscribeRSS Feed
mrainer
Calcite | Level 5

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

1 REPLY 1
TomKari
Onyx | Level 15

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

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 610 views
  • 0 likes
  • 2 in conversation