Home » SQL & PL/SQL » SQL & PL/SQL » Expression list as a parameter to Procedure
Expression list as a parameter to Procedure [message #39434] Wed, 17 July 2002 09:13 Go to next message
Josh
Messages: 9
Registered: August 1999
Junior Member
Hi Friends, I have a Cursor with a "WHERE fieldId IN expr_list" in my stored procedure. I want to pass this expr_list to my procedure as input parameter. Does anyone have any idea how do I pass such an expression list to the procedure, other than sending a string list and parsing it inside the procedure.

I was wondering if there is a data type for expression list or a way to pass undefined input parameters to a procedure.

Thank you,
Josh.
Re: Expression list as a parameter to Procedure [message #39441 is a reply to message #39434] Wed, 17 July 2002 10:36 Go to previous messageGo to next message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
Here is a great approach using object types that has worked very well for me:

http://asktom.oracle.com/pls/ask/f?p=4950:8:::::F4950_P8_DISPLAYID:110612348061
Re: Expression list as a parameter to Procedure [message #39448 is a reply to message #39441] Wed, 17 July 2002 13:37 Go to previous messageGo to next message
Josh
Messages: 9
Registered: August 1999
Junior Member
Hi Todd,

Thanks for your reply. The soultion works for me when I compile the funtion "str2tbl" and my procedure stand-alone, but when I put everything in a package, the same procedure gives a comilation error "PLS-00382: expression is of wrong type". Do u know what could be causing this error.

Thank you,
Re: Expression list as a parameter to Procedure [message #39453 is a reply to message #39448] Wed, 17 July 2002 14:29 Go to previous message
Todd Barry
Messages: 4819
Registered: August 2001
Senior Member
I'd have to see your code to have any idea. For what it's worth, I have this approach in place in dozens of procedures within packages.
Previous Topic: Insert is lateness
Next Topic: '######' in number field.
Goto Forum:
  


Current Time: Thu Mar 28 13:24:02 CDT 2024