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
Answer Posted / 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 |
Post New Answer View All Answers
How do you handle two sessions in Informatica
How to improve the performance of a session using sorter transformation?
What is the use of source qualifier?
What is informatica worklet?
Explain sql transformation in script mode examples in informatica
What is the use of target designer?
What do you mean by DTM and Load manager and what is difference between load manager and load balancer?
Explain what transformation and how many are there in informatica?
what are 3 tech challenges/ common issues you face?
What is the status code in stored procedure transformation?
What are session parameters ? How do you set them?
hi real timers . iam waiting for ur reply regarding ETL TESTING
Explain about cumulative Sum or moving sum?
What are the designer tools for creating transformations?
what is informatica metadata?