Page 1 of 1

Different delimiters within a record

Posted: Wed Jan 16, 2008 11:31 pm
by kunal1101
Hi....
i am again back with delimiters...
what is the workaround if i have different delimiters to seprate fields within a record?
for ex.:- i have data as:-
CustomerID;ABCWIDGET~ABC Widgets, Inc.

where my first delimiter is ';' between customerid and ABCWIDGET and second delimiter is ~ between ABCWIDGET and ABC Widgets, Inc.

I tried specifying different seprators while defining the above mentioned indiviual items.But my problem lies in what complonent syntax i should have for the group containing above items?.It should be surely delimited and i cant specify more than one delimiter.
:?
Please help.

Re: Different delimiters within a record

Posted: Thu Jan 17, 2008 2:32 am
by mdan
Hi,
you may use 2 successive "column importer" stages:
- read the file as a single (long) line - varchar
- the first one has as delimiter the ';' char, and the second group is imported as one single column
- the second one it will have '~' as delimiter, using as input column the second group; map only the previously imported columns

You can do the same split using a transformer and field func (if you don't want to use column importer).

Dan

Posted: Thu Jan 17, 2008 4:53 am
by janhess
mdan this is dstx forum.

Posted: Thu Jan 17, 2008 4:59 am
by janhess
mdan this is dstx forum.

CustomerID;ABCWIDGET~ABC Widgets, Inc.

You can create a group containing 2 groups
First contains Item CustomerID and Group Widget with ; delimiter
Second contains items widget name and widget company with ~ delimiter

Posted: Thu Jan 17, 2008 5:31 am
by kunal1101
thanx janhess 8)