Page 1 of 1

split multiple rows

Posted: Tue Sep 16, 2008 2:28 am
by snt_ds
hi,

how to split multiple records based on delimiter

source is 1#2#3#4#5 ..n

it should be present in target like this
Ans
-------
1
2
3
4
5
.
.
n


Regds
Ramesh

Posted: Tue Sep 16, 2008 2:56 am
by varaprasad
specify the record delimiter as '#' in the file format properties.

Posted: Tue Sep 16, 2008 3:08 am
by ray.wurlod
Parse into separate columns then run these through a Pivot stage.

Posted: Tue Sep 16, 2008 3:12 am
by snt_ds
ray.wurlod wrote:Parse into separate columns then run these through a Pivot stage.
Thanks Ray
But the value of 'n' is not fixed.
please suggest.

Posted: Tue Sep 16, 2008 3:16 am
by ray.wurlod
Configure enough columns for the largest expected N.

Posted: Tue Sep 16, 2008 3:17 am
by ray.wurlod
Convert the # to @VM and load into a hashed file with a key generated as @OUTROWNUM. Then read from the hashed file dynamically normalized on your multi-valued column. You will need to set up the table definition with the "supports multi-valued columns" check box selected.

Posted: Tue Sep 16, 2008 3:19 am
by varaprasad
I mentioned 'record delimiter' NOT 'field delimiter'
I believe it should work in ur scenario.