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


Please Help Members By Posting Answers For Below Questions

How to extract sap data using informatica? What is abap? What are idocs?

676


What are the features of complex mapping?

737


How can we use batches?

686


what is degenerated dimension?

3308


What is the difference between Active and Passive transformation?

736






What is the need of etl tools?

714


How are indexes created after completing the load process?

1094


Dimension Object created in Oracle can be imported in Designer Cubes contain measures

2011


what are factless facts? And in which scenario will you use such kinds of fact tables.

1411


How many ways a relational source definition can be updated and what are they?

664


Explain constraint based loading in informatica

748


What is complex mapping?

756


Different circumstance which drives informatica server to expel records?

634


Hi, I am planning to take Infa Certification exam but am unable to find its dumps anywhere on web. If anybody has it, plz share them with me. jkinfo22@gmail.com Thanks in advance

1725


What are the prerequisite tasks to achieve the session partition?

811