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
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 |
It wouldn't work many to one concept for Normalizer.
| Is This Answer Correct ? | 0 Yes | 1 No |
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 |
Discuss the advantages & Disadvantages of star & snowflake schema?
What is batch and describe about types of batches?
wtite sql query following table are city gender no chennai male 40 chennai female 35 bangalore male 10 bangalore female 25 mumbai female 15 i want the output? city male female chennai 40 35 bangalore 10 25 mumbai null 15
one source to target loading insert new rows and update existing rows?
What is rank transformation in informatica
how can we load first and last record from a flat file source to target?
7 Answers Infosys, ITC Infotech,
we have 6 records in source , i need 2nd record in one target and 5th record in one target or 2nd & 5th record in same target.
A session S_MAP1 is in Repository A. While running the session error message has displayed
How to configure mapping in informatica?
i have a table like empid ename year month sal 1 x 98 jan 500 1 x 98 feb 500 1 x 98 mar 500 1 x 99 jan 600 1 x 99 feb 600 2 y 98 jan 600 2 y 98 feb 600 2 y 98 mar 600 2 y 99 jan 700 2 y 99 jan 700 and so on i want to find out totsal for every emp on year wise plz help me
How to improve the session performance in informatica?
What are pre and post-session shell commands?