Hi All,
I have a variable which holds a comma separated values as a string. Now I want to delete certain rows from a table based on the column whose values are the comma separated values.
Here is the case:
create table sail_1 (c1 varchar2(10));
insert into sail_1 values('yes');
insert into sail_1 values('no');
insert into sail_1 values('may be');
commit;
declare
v1 varchar2(100):='yes,no,may be';
begin
delete from sail_1 where c1 in v1;
end;
/
Now, no rows are being deleted from the table (which might seem an obvious thing for the experts ).
So what change do i need to do.
I don't want to separate the values, store them in a collection and then use them. I want the variable v1 to be massaged some way and need the desired output.
Regards,
Sail