Hi Team,
How to Concatenate multiple rows delimited by comma
Ex: I have a column
1025758
1025758-1025759
1025758-1025759-1025758-1025759
Output would be
1025758,1025758-1025759,1025758-1025759-1025758-1025759
Thanks and Regards
SHRINIVAS
Concatenate multiple rows delimited by comma
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 135
- Joined: Tue Aug 14, 2007 4:27 am
- Location: Mumbai
if records are less you can use below simple unix shell script ..
cat filename | while read line do
{
x=$line:,:x
}
done
print $x >> op_file_name
Alternatively using transformer....
stage variable coltorow=''
coltorow=input.columnname:',':coltorow
i hope there are other better way around
cat filename | while read line do
{
x=$line:,:x
}
done
print $x >> op_file_name
Alternatively using transformer....
stage variable coltorow=''
coltorow=input.columnname:',':coltorow
i hope there are other better way around
Thanks
Swapnil
"Whenever you find whole world against you just turn around and Lead the world"
Swapnil
"Whenever you find whole world against you just turn around and Lead the world"