cancel
Showing results for 
Search instead for 
Did you mean: 

Using Variables in BODS

Former Member
0 Kudos

Hi Experts,

i have a senario lets consider sample source table

pro_id     item_number     store_name

101          10                    store1

102          10                    store1

101          10                    store2

101          10                    store3

102          10                    store2

i need ouput as

pro_id     item_number     store_name

101          10                         store1, store2, store3

102          10                         store1, store2

plz help regarding this ....

Thanks & Regards,

Mahe

Accepted Solutions (0)

Answers (2)

Answers (2)

mohan_salla
Participant
0 Kudos

Use Pivot transform to resolve this..

titto_antony
Active Participant
0 Kudos

Hi Mahe,

If the pro_id is constant you can create a custum function to concatinate the storename based on the Pro_id Filed. as given below. Put a row_num to each row in the flow and take out the column with max row_num based on grp pro_id  to filter the record with all the store name after the custom function.


if  ($Id=101)
$LocalStoreName =$Input_SotreName||','||$LocalStoreName;
if  ($Id=102)
$LocalStoreName2 =$Input_SotreName||','||$LocalStoreName2;

$Output_StoreName=$LocalStoreName;
$Output_StoreName2=$LocalStoreName2;
Return $LocalStoreName;