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

Which kind of index is preferred in DWH?

3 Answers  


How can you display only hidden files in UNIX

4 Answers   Cognizant, L&T,


What are two types of processes that informatica runs the session?

2 Answers  


i have 50500 records in my source.if wf run for the first time it will load 1000 records into 1 tgt,if runs second time it will load to another tgt.targets are FF and it is need to be created dynamically.how many tgt will be created and how?

1 Answers   HCL,


Can we use parameters of parameter file in presession command

1 Answers   Wipro,






what is the process of target load planing?

2 Answers   IBM,


What aer the out put files that the informatica server creates during the session running?

4 Answers  


how can u avoid duplicate rows in flat file?

4 Answers   CTS, Wipro,


What exactly mentioned in High level design document.can somebody explain me sequentialy.

1 Answers   IBM,


What is the difference between view and materialised view?

4 Answers  


how we can add header and footer to flat files?

2 Answers   Tech Mahindra, Zensar,


How many transformations can be used in mapplets.

0 Answers  


Categories