decode function

-- update cv_id column that still null
update ca_ba_patching_06122007 set cv_id =
decode(SUBSTR(BA_NUM, 2, 1), '9', '001', '8', '001', '5', '001', '1', '004', '2', '004', '3', '021', '4', '024')
where cv_id is null

0 comments:

Find It