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
what is informatica metadata?
how tokens will generate?
lookup transformation with screenshots
what is persistent lookup cahce?how to use and when to use this persistent lookup cahce?explain?
Write the different tools in the workflow manager?
What are the various types of transformation?
Explain what are the different versions of informatica?
What does reusable transformation mean?
scenario where i can use only concurrent execution of workflow.
Where are the source flat files kept before running the session?
What are the designer tools for creating transformations?
How can a transformation be made reusable?
what is size of u r database?
What is meant by lookup transformation?
Enlist some properties of sessions.