Hello ,
My requirement is to add additional column sequentially to a text file based on the column value -
i/p file
id1|varchar
id2|varchar
id3|number
id4|number
id5|date
id6|date
---------------------------------------
o/p file
colv1|id1 (if second column value is varchar then first value is colv then sequence)
similarly
colv2|id2
coln1|id3(if second column value is number then first value is coln then sequence)
similarly
coln2|id4
cold1|id5(if second column value is date then first value is cold then sequence)
similarly
cold2|id6
so the o/p will be
colv1|id1
colv2|id2
coln1|id3
coln2|id4
cold1|id5
cold2|id6
Please suggest , thanks!!