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!

IN Parameter to use under cursor

user8564931Mar 5 2019 — edited Mar 5 2019

I am trying to pass multiple values to a Cursor parameter through a bind variable and its throwing error ORA-01722: invalid number.

org_id data type is Number and the lv_org is a character data type to pass multiple org_values separated with comma.  I have tried to convert org_id column values with to_char() and then its not retrieving any data.

cursor c_emp(lv_org varchar2)

select firstname,last_name,empid from xx_emp_mast

where org_id in (lv_org);

I am passing values are like to the cursor.

(1492,9442,94994);

Comments
Post Details
Added on Mar 5 2019
7 comments
395 views