Hi Experts,
In our project we have requirement where in we have to compare header of one file with header in the parameter file.
There are 20 files which we ftp from one site. All this files have different header.
We are comapring this file with our parameter file(which is having the header fields in the format what we are expecting) :o
If the ftp file header format matches with the parameter file format then we are processing these file, if not we are renaming it Unprocess_file.
The parameter file structure is :
FileName|Daily_Process|Expected_Header|TABLE_NAME
acct_details.csv|Y|ACCT_NBR,UserName,Status,Date|ACCT_DETAILS
address_info.csv|Y|ACCT_NBR,ADD_DETAILS,STATE,ZIP|ADDRESS_INFO
Now the problem is the one the of the source file header is coming as :
ACCT_NBR, ADD_DETAILS, STATE, ZIP
That is it has got spaces in between the column names.
How can i compare these file with existing parameter file. If i change the parameter file (that is added space in between the columns ) still its not working.
How can I handle this scenario?
Thanks in Advance!!