I am using oracle 10g version. Can any one please tell me how to pass the query result to IN clause of oracle stored procedure..?
For Example: I have a Employee table which returns only employee names ( select employeeNames from Emplyoee -> this query returns more than 100 employee names).
In my oracle stored procedure, I want to pass these values to comma seperated string....
I have stored the query result in one variable like employee_query="select employeeNames from Employee". Now my requirement is how to pass this query result as comma seperated strings to IN clause of my stored procedure?
Thanks in Advance.
You can turn the results of the query into a comma separated string using string aggregation.
https://oracle-base.com/articles/mis ... niques.php
That string can then be passed into the procedure as a regular IN parameter.
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: https://oracle-base.com
My blog: https://oracle-base.com/blog
Who is online
Users browsing this forum: No registered users and 1 guest