BookmarkSubscribeRSS Feed
help09
Fluorite | Level 6

Hi 

 

I am planning to execute oracle sql procedure with following date '01/JAN/1900' as input parameter in order to pull limited data.

 

Thanks for  your help in advance

 

 
proc sql;
connect to oracle (user=&username password=&passwrd path=&dbname);
execute (execute PROC_CREATE_TABLE('01/JAN/1900')) by oracle;
disconnect from oracle;
quit;

5 REPLIES 5
RW9
Diamond | Level 26 RW9
Diamond | Level 26

Is thre a question in there somewhere, or would you just like the advice that its never a good idea to put data (date in this case) as table or column names?

help09
Fluorite | Level 6
Its a sample which i have provided. I need to insert date in such format to kick off procedure such format.
Do we have any other syntax to execute procedure by inserting date from sas
SASKiwi
PROC Star

Your code looks OK - it is very similar to this: http://support.sas.com/kb/18/350.html

 

But please note you can't return a result set from a stored procedure. You need to get the stored procedure to create a table or view that can then be queried separately. 

LinusH
Tourmaline | Level 20
Do that syntax of yours work in Oracle?
If yes, have you tested in SAS? What do you need help with?
Data never sleeps
Sven111
Pyrite | Level 9
That doesn't appear to be valid Oracle code in the execute block unless you've got some oddly named stored procedures you're working with. And I can't see how you can create a table only passing a date. Can you provide some more context?

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 5 replies
  • 5169 views
  • 0 likes
  • 5 in conversation