write a query row to column follwing source?

quarter sales
q1 5000
q1 9000
q1 7000
q1 6000
q2 5000
q2 4000
q2 3000
q2 1000
q3 4000
q3 3000
q3 1000
q3 2000
q4 5000
q4 400
i want the output?
q1 q2 q3 q4
sales

Answers were Sorted based on User's Feedback



write a query row to column follwing source? quarter sales q1 5000 q1 9000 q1 ..

Answer / ankit kansal

Hi All,
select sales,sum(q1),sum(q2),sum(q3),sum(q4)
from
select 'sales' as sales
,case when quarter='q1' then sales else 0 end case as q1
...q2
...q3
...q4
)temp group by sales;

http://deepinopensource.blogspot.in/

Is This Answer Correct ?    1 Yes 0 No

write a query row to column follwing source? quarter sales q1 5000 q1 9000 q1 ..

Answer / senthil kumar s

It wouldn't work many to one concept for Normalizer.

Is This Answer Correct ?    0 Yes 1 No

write a query row to column follwing source? quarter sales q1 5000 q1 9000 q1 ..

Answer / gm

SQL:
select quarter, sales from table_name
group by quarter, sales;

Informatica:
Source-SQ-Exp-Normalizer Trans.-Tgt
In Normalizer Transformation we can do row into column.

Is This Answer Correct ?    4 Yes 7 No

Post New Answer

More Informatica Interview Questions

WAT IS TEXT LOAD?

3 Answers   Wipro,


i have f;latfile source. i have two targets t1,t2. i want to load the odd no.of records into t1 and even no.of recordds into t2.

3 Answers   Wipro,


What is rank transformation?

0 Answers  


What is informatica powercenter repository?

0 Answers  


How to generate sequence numbers without using the sequence generator transformation?

0 Answers   Informatica,






where to store informatica rejected data?

0 Answers  


hi all my source looking like below column1 column2 101,102,103 abc,def,ghi 1001,1002,1003 a,b,c i want my target is column1 column1 101 abc 102 def 103 ghi 1001 a 1002 b 1003 c any one can you help

1 Answers  


Hi, I have one scenario.. i want to insert 4 times (Duplicate) a row in the target. Please help me . source row: abcabc Tgt table: abcabc abcabc abcabc abcabc

10 Answers   Cap Gemini, IBM,


Can we use the mapping parameters or variables created in one mapping into another mapping?

1 Answers   Informatica,


What are the popular informatica products?

0 Answers  


explain the scenario for bulk loading and the normal loading option in Informatica Work flow manager ???

8 Answers   CTS, TCS,


can we have to do changes in session property when we are dynamically generating target files?

3 Answers   Wipro,


Categories