I'm exporting data from an SQL statement to a flat file with sqlplus and spool ...
How do I:
a) Separate error message output from the data output
b) Continue outputting data after a conversion error is reported
For example, the SELECT might include conversions like:
TO_CHAR(TO_DATE(column, 'YYYYMMDD'), 'MM/DD/YYYY')
and occasionally, the database may have an invalid MM value.
Looking for generic ways of handling messages, rather than specific rewrites of this particular conversion to avoid errors.