Help using Base SAS procedures

Execute Oracle SQL Procedure with DATE parameter

Reply
Occasional Contributor krc
Occasional Contributor
Posts: 17

Execute Oracle SQL Procedure with DATE parameter

[ Edited ]

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;

Super User
Super User
Posts: 7,413

Re: Execute Oracle SQL Procedure with DATE parameter

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?

Occasional Contributor krc
Occasional Contributor
Posts: 17

Re: Execute Oracle SQL Procedure with DATE parameter

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
Super User
Posts: 3,113

Re: Execute Oracle SQL Procedure with DATE parameter

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. 

Super User
Posts: 5,260

Re: Execute Oracle SQL Procedure with DATE parameter

Do that syntax of yours work in Oracle?
If yes, have you tested in SAS? What do you need help with?
Data never sleeps
Frequent Contributor
Posts: 82

Re: Execute Oracle SQL Procedure with DATE parameter

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?
Ask a Question
Discussion stats
  • 5 replies
  • 172 views
  • 0 likes
  • 5 in conversation