Skip to content

Instantly share code, notes, and snippets.

@bertday
Last active August 9, 2016 16:05
Show Gist options
  • Save bertday/622da314f82d8d24ced4b0c7f6effd48 to your computer and use it in GitHub Desktop.
Save bertday/622da314f82d8d24ced4b0c7f6effd48 to your computer and use it in GitHub Desktop.
Tries to execute an Oracle query and writes out failing values. Note: you have to turn on dbms_output in SQL Developer first.
declare
d date;
begin
for i in (select * from properties_csv) loop
begin
d:= to_date(i.sale_date, 'yyyymmdd');
exception
when others then
dbms_output.put_line('KO: "' || i.sale_date || '"');
end;
end loop;
end;
/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment