hi guru's
i have a senerio where in the ", " delimeted seq file ,inside the column contains "," like
001,ravi,kumar,98
002,ramkumar,34
could u please let me know is there any whay to solve this
Thanks in advance
KKReddy
comma delimeted files
Moderators: chulett, rschirm, roy
Re: comma delimeted files
Read a whole line as a single column, you can achieve this with having 000 as the quote character and 010 as the delimiter. Now process this single column according to the requirement.
kkreddy wrote:hi guru's
i have a senerio where in the ", " delimeted seq file ,inside the column contains "," like
001,ravi,kumar,98
002,ramkumar,34
could u please let me know is there any whay to solve this
Thanks in advance
KKReddy
Success consists of getting up just one more time than you fall.
Hi,
Is your source file have similar pattern,ie delimiter variation is only in the second/string field.
Assuming u want output to be like this below,
001,ravikumar,98
002,ramkumar,34
Define ur source file with 000 delimiter -single Column.
Declare StageVariable to hold the count of ","
DCount (string, delimiter)
For 1st record
Use Field ("Source"string, ",", 1)
For Last Record
Use Field ("Source"string, ",", (StageVariable))
For 2nd record
Trim((Iconv("Source", "MC/N")),",""A")
Regards
kcs
Is your source file have similar pattern,ie delimiter variation is only in the second/string field.
Code: Select all
001,ravi,kumar,98
002,ramkumar,34
001,ravikumar,98
002,ramkumar,34
Define ur source file with 000 delimiter -single Column.
Declare StageVariable to hold the count of ","
DCount (string, delimiter)
For 1st record
Use Field ("Source"string, ",", 1)
For Last Record
Use Field ("Source"string, ",", (StageVariable))
For 2nd record
Trim((Iconv("Source", "MC/N")),",""A")
Regards
kcs