Could some one help me with creating a example, to implement a dynamic query that uses IN clause and populate the results to cursor. The input parameter could be array or string concatenated.
I have been trying a lot but no successful.
Thanks..
Could some one help me with creating a example, to implement a dynamic query that uses IN clause and populate the results to cursor. The input parameter could be array or string concatenated.
I have been trying a lot but no successful.
Thanks..
Clasic situation everyone has. You can form a Query string dynamically based on your array or sometthing. And use as OPEN CURSOR. .
IN clause supports maximum of 1000 items. You can always use a table to join instead. That table might be a
Global Temporary Table(GTT)
whose data is visible to thats particular session.Still you can use a
nested table
also for it(like PL/SQL table)TABLE()
will convert a PL/Sql table as a SQL understandable table object(an object actually)A simple example of it below.