Focal Point
{solved}concatenation of row values and store into one row in dmc

This topic can be found at:
http://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/726106202

August 07, 2009, 09:49 AM
thenmozhi
{solved}concatenation of row values and store into one row in dmc
hi,

i am having my source columns and values as

c1 c2 c3
1 1 a
1 2 b
1 3 c
2 1 d
2 2 e

and i want to load this values in to target as

c1 c3
1 abc
2 de

that is values of c3 must be concatenated to single value for each value of c1 and loaded into target.

eg:
For c1 = 1
c3 = a || b || c

For c1 = 2
c3 = d || e

can any one help me how to do this in dmc..

thanks in advance.

thenmozhi

This message has been edited. Last edited by: thenmozhi,
August 09, 2009, 05:32 PM
Waz
Did you do a search to see if this has been asked before ??

The following link show how to do this in WebFOCUS.

http://forums.informationbuild...791008331#2791008331


Waz...

Prod:WebFOCUS 7.6.10/8.1.04Upgrade:WebFOCUS 8.2.07OS:LinuxOutputs:HTML, PDF, Excel, PPT
In Focus since 1984
Pity the lost knowledge of an old programmer!

August 10, 2009, 10:44 AM
Clif
Im guesssing that by "in dmc" you mean that you are using the Data Management Console with a DataMigrator server and want to create a Data Flow with with a SQL SELECT statement. You can do that like this.

 SELECT 
   C1 , 
    MAX(IF (C2  = 1 , C3 , '' ))|| MAX(IF (C2  = 2 , C3 , '' ))|| MAX(IF (C2  = 3 , C3 , '' )) AS C3 
FROM 
   c123 T1 
 GROUP BY 
   C1