the data is coming from text files which are fed into a table on oracle using sql loader.

the last column on this table is an errorcode which on loading is null for every record.

i then run a validate script which then checks each row to make sure it conforms to specification.

this particular file has around 50 columns whihc have to validated in one way or another - the example i gave was much simplified than the actual script.