1752801 Members
5778 Online
108789 Solutions
New Discussion юеВ

CSV file help-awk

 
viseshu
Frequent Advisor

CSV file help-awk

Hi All,
I have a CSV file like
"hi","my,home",1245,"hellow",56457,...
"new",73994,"may,get",12335,..
I want to check whether each field is of predefined length(len='2 8 6 8 9')..if lenght of particular field doesnt match it should return the record and field number...Can you please help itout?
NOTE: commas may be present in the double quotes and if any of the fields(character) doesnt contain double quotes then itshud return the record and field number also..
2 REPLIES 2
Hein van den Heuvel
Honored Contributor

Re: CSV file help-awk

See prior discussion in:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1064324

Read it.
Read it again.

Good luck!
Hein.
Peter Godron
Honored Contributor

Re: CSV file help-awk

Hi,
sqlload the data onto oracle database. It will do all the length checking etc., it will also find any numeric field errors.
The sqlload will provide you with clean data on the database, and an error file with all your records detailed with error location.