Hi Ravindra,
Thanks for your response.
Below is the source data:
STATUS,USERID,USERNAME,FIRSTNAME,NICKNAME,MI,LASTNAME,SUFFIX,TITLE
STATUS,USERID,Username,FirstName,Nickname,MiddleName,LastName,Suffix,Title
ACTIVE,80001001,itria1,Carlos Guillermo, , ,Itria, ,
ACTIVE,80001002,lafournere1,Jean-Paul, , ,, ,
ACTIVE,80001003,,Wade Peter, , ,, ,
ACTIVE,80001004,,Olivier, , ,, ,
Could you please have a look on this and please provide me the code to get the record count:
I have checked the latest code provided, but could not give me correct results. The above source data is now separated with the columns with the data having nulls with the commas (,)..
My output should be as below :
STATUS,USERID,USERNAME,FIRSTNAME,NICKNAME,MI,LASTNAME,SUFFIX,TITLE
STATUS,USERID,Username,FirstName,Nickname,MiddleName,LastName,Suffix,Title
4,4,2,4,0,0,1,0,0
Please help to resolve.. Thank you for your support.
Regards,
Kiran.
---------- Post updated at 09:04 AM ---------- Previous update was at 08:22 AM ----------
Hi Rudic,
Thank you for your response.
The code provide by you is giving the correct but the last column output result is not giving the correct record count.
Source file is below :
STATUS,USERID,USERNAME,FIRSTNAME,NICKNAME,MI,LASTNAME,SUFFIX,TITLE
STATUS,USERID,Username,FirstName,Nickname,MiddleName,LastName,Suffix,Title
ACTIVE,80001001,itria1,Carlos Guillermo, , ,Itria, ,
ACTIVE,80001002,lafournere1,Jean-Paul, , ,, ,
ACTIVE,80001003,,Wade Peter, , ,, ,
ACTIVE,80001004,,Olivier, , ,, ,
Target file after running the code provided by you is giving as below :
STATUS,USERID,USERNAME,FIRSTNAME,NICKNAME,MI,LASTNAME,SUFFIX,TITLE
STATUS,USERID,Username,FirstName,Nickname,MiddleName,LastName,Suffix,Title
4,4,2,4,0,0,1,0,4
The last columns count is giving as 4 which is incorrect.
Expected result is as below : (last column should be 0 as count)
STATUS,USERID,USERNAME,FIRSTNAME,NICKNAME,MI,LASTNAME,SUFFIX,TITLE
STATUS,USERID,Username,FirstName,Nickname,MiddleName,LastName,Suffix,Title
4,4,2,4,0,0,1,0,0
Please help to resolve this issues.
Thanks you,
Kiran.