Stored Procedure with CSV string as parameters
869588Jun 17 2011 — edited Jun 20 2011Hi,
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.