I am attempting to read a log file from a database import to determine the rows that failed in order to write to an exception file. An example block from the log file is as follows:
SQL3124W The field value in row "6" and column "2" cannot be converted to a
PACKED DECIMAL value, but the target column is not nullable. The row was not
SQL3123W The field value in row "7" and column "3" cannot be converted to a
PACKED DECIMAL value. A null was loaded.
The only consistent part I can search on is the text "The row was not loaded".
I need to treat the 3 lines together as a single block to do my search to pull my row number.
I have been using AWK to this point, but would be interested in any solution.