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 if the source is a flat-file?
Can we get 1st record through Informatica(without sequence number).
How to differentiate between the active and passive transformations?
4 yrs etl devloper roles and responsibilities?any body give solutions
How does the aggregator transformation handle null values?
How do you convert single row from source into three rows into target?
What is the difference between Active and Passive transformation?
What is transformation?
Name at least 5 different types of transformations used in mapping design and state the use of each.?
What are different types of transformations available in informatica?
what are the Methods For Creating Reusable Transformations?
What are the types of data warehouses?
Can we create a Integration service without a Repository service and vice versa?
Explain in detail scd type 2 through mapping.
How to configure mapping in informatica?