|
How do I read/find/replace fields in a csv datafile?
hello.
I'm somewhat a novice here so please be patient. My stumbling block when loading csvs into ORACLE tables is this:
I need to read a csv datafile, check several fields in each line, and if any of stated fields contain A ZERO only [instead of YYYYMONDD date field expected] then replace it with a null/blank character.
I had a go at:
cat <datafile> | awk ‘$5 == “0” { “ “ } END { print }';
cat <datafile> | awk ‘$8 == “0” { “ “ } END { print }'; ..etc..
..alas it didn't work..
all advice/comments very much appreciated
Steven.
|