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



write a query row to column follwing source? quarter sales q1 5000 q1 9000 q1 ..

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

write a query row to column follwing source? quarter sales q1 5000 q1 9000 q1 ..

Answer / senthil kumar s

It wouldn't work many to one concept for Normalizer.

Is This Answer Correct ?    0 Yes 1 No

write a query row to column follwing source? quarter sales q1 5000 q1 9000 q1 ..

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

Post New Answer

More Informatica Interview Questions

source file name xyz a,0,a,a,a b,b,b,0,b c,c,c,0,c target should be like this xyz a b c how to implement this?

4 Answers   Polaris,


What does update strategy mean, and what are the different option of it?

0 Answers  


Hi all, Can you please send me the Dimensions and fact tables which are used in mutual fund project. and please send me the brief summary about the project. Please do the needful.

0 Answers  


if i am having 10 records in source, i want 20 records in target...how will you do it

13 Answers   BirlaSoft, IBM,


How IN function works in informatica? Is it similar that of oracle IN function or different? Explain

2 Answers   Mphasis,






If session fails after loading 10000 records in the target,how can we load 10001 th record when we run the session in the nexttime?

8 Answers   HeadStrong, TCS,


How informatica process data means how informatica works?

2 Answers   TCS,


In a concurrent batch if a session fails, can you start again from that session

1 Answers  


how to obtain performance data for individual transformations.

2 Answers  


How is Source Side push down optimization different to just providing a SQL override in Source qualifier transformation.

0 Answers  


When the informatica server marks that a batch is failed?

1 Answers  


How to load last n records of file into target table - informatica

0 Answers   Informatica,


Categories