Page 1 of 1

Spliiting a single row into multiple row

Posted: Wed Aug 06, 2008 9:44 am
by goutam
Hi folks,

I have the following requirement.
I have two input columns. ASSET_ID and DESC. Length of DESC field is not fixed. Output columns are same but with a fixed length of DESC field.

input row 100, WEBER MARKING SYSTEMS INC
output row should be
100, WEBER MARK
100, KING SYSTE
100, MS INC

i.e splitting the DESC field with a length of 10.
Can it be accomplished this thru transformer? If yes how?
if no, please give any ideas.

Posted: Wed Aug 06, 2008 10:07 am
by girija
What will be the max length of your input DESC?

Posted: Wed Aug 06, 2008 10:39 am
by goutam
girija wrote:What will be the max length of your input DESC?
i am reading DESC column value with longvarchar datatype.Precision is 999999.

Posted: Wed Aug 06, 2008 10:48 am
by mystuff
you have to use a function and loop around it.

Posted: Wed Aug 06, 2008 10:49 am
by goutam
mystuff wrote:you have to use a function and loop around it.
what kind of function??? can you please be more specific on your idea?

I was trying to solve it using buildop stage. But got stuck in string manipulation. I was using string conctenation function available in C. but there was some compilation problem.

Can anybody tell me what all function are available under APT_string header file.?

Posted: Fri Aug 08, 2008 1:53 am
by goutam
mystuff wrote:you have to use a function and loop around it.
Thanks to all of you. I resoved the problem using build stage.

Posted: Fri Aug 08, 2008 2:50 am
by ray.wurlod
Would you care (a) to mark the thread as Resolved, and (b) to share your solution?

Tell the solution

Posted: Fri Aug 08, 2008 9:36 am
by budde43
Hi

Can you give the solution for your problem .How did you solved it,I think it is usefull for me.

Thanks