Anonymous PL/SQL block - Find invalid number in a column |
set serverout on DECLARE CURSOR c1 is select wcmsid from inac_wcmms_inte.md_item ; v_wcmsid inac_wcmms_inte.md_item.wcmsid%type; BEGIN OPEN c1; FETCH c1 INTO v_wcmsid; WHILE c1%FOUND LOOP FETCH c1 INTO v_wcmsid; begin v_wcmsid:=to_number(v_wcmsid); exception when others then dbms_output.put_line(v_wcmsid); end; END LOOP; CLOSE c1; END; / |