I have a comma separated string variable v_combined_prodid . But i wants to convert comma separated string variable to comma separated int value or in loop where we can update one table with where clause prodid as int. we cant use FIND_IN_SET(prodid, v_combined_prodid )
we can use stored procedure.
DECLARE v_combined_prodid varchar(800);
set v_combined_prodid ='1,2,3,4,5';
below statement exactly requirement.
update mytable t set t.status=2
WHERE prodid in (1,2,3,4,5)
and t.status=0 ;