I have an requirement where in the columns names in a table (Table A) should appear in rows of target table (Table B) i.e. converting columns to rows. Is it possible through Informatica? If so, how?

Questions by baru

Showing Answers 1 - 2 of 2 Answers

Sudip

  • Mar 10th, 2006
 

if data in tables as follows
Table A
Key-1 char(3);
table A values
_______
1
2
3


Table B
bkey-a char(3);
bcode  char(1);
table b values
1 T
1 A
1 G
2 A
2 T
2 L
3 A

and output required is as

1, T, A
2, A, T, L
3, A

the SQL query in source qualifier should be

select key_1,
          max(decode( bcode, 'T', bcode, null )) t_code,
             max(decode( bcode, 'A', bcode, null )) a_code,
          max(decode( bcode, 'L', bcode, null )) l_code
    from a, b
    where a.key_1 = b.bkey_a
    group by key_1
   /

  Was this answer useful?  Yes

girish

  • Mar 16th, 2006
 

use sequence genetrator transformation

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions