Update using CSV in a vachar
Posted on 2008-09-29
I have a stored procedure that accepts comma separated value in varchar2 variable. I basically want to update all of the records that this csv value holds so for example something like this...
Is this possible? or my only option is to loop through each csv value and then update each at a time? When I try below code out in a stored procedure I get a
ORA-01722: invalid number error.
csv_rids IN Varchar2 -- Comma separated RID Values
SET col5 = 'NO',
col4 = '',
col3 = 'NO',
col2 = '',
col1 = 'YES'
where rid in (csv_rids);