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

Source having one lakh record and loaded into target. Then, how can i compare records will loaded in table? For example Source having Firstname,Lastname. the same Firstname,Lastname record will be loaded into Target? How can i check in Oracle?

5 Answers  


if the session fails after 100 records agian we have to starts the session or we go for recovery session

2 Answers   TCS,


Different sorts of metadata that stores in the storage facility?

0 Answers  


what are the fact table & dimensional table in pharmaceutical and hospotal related products???

0 Answers   IBM,


Do you have knowledge in ralph kimball methodology

1 Answers  






what are the Methods For Creating Reusable Transformations?

0 Answers   Informatica,


What is surrogate key?

9 Answers  


Differentiate between a repository server and a powerhouse?

0 Answers  


I have table name called Team and I have name and DOJ in that table in oracle, when I retrive the table in Informatica DOJ shows with date and time , I want want to know is it possible to get only date(MMDDYYYY) in the date data type,

3 Answers   CSC,


any body can say about all versions of informatica ?how many versions ?

2 Answers  


What are the informatica performance improvement tips

0 Answers   Informatica,


What is fact table? Explain the different kinds of facts.

0 Answers  


Categories