Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Stored Procedure with CSV string as parameters

869588Jun 17 2011 — edited Jun 20 2011
Hi,

I have been tasked with this issue, but I have no real SQL/Oracle experience. My boss advises that the best way to do this would be to pass a CSV string into the stored proc for each parameter,

What I need to do is parse the CSV string and use each value within their as part of the where clause so. If I have two parameter CSV strings A and B. My outcome would be something like:

select * from table where col1 = A1 or A2 or A3 and col2 = B1 or B2 or B3.

The number of values within each CSV string are unknown until they are passed into the stored proc. How would I best go about this?

Thanks,

Darren.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 18 2011
Added on Jun 17 2011
16 comments
3,192 views