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

Design a mapping to get the pervious row salary for the current row. If there is no pervious row exists for the current row, then the pervious row salary should be displayed as null.

0 Answers   Informatica,


Debugger what are the modules, what are the options you can specify when using debugger, can you change the expression condition dynamically when the debugger is running.

0 Answers  


what is the diff b/w cached and unchaed look ups

3 Answers   IBM, TCS, Wipro,


What is dimensional table?

0 Answers  


What is a surrogate key?

0 Answers  






What is the advantage of informatica?

0 Answers  


in a table it has 200 rows the query is select 150 from tablename.whats the output

2 Answers   Cap Gemini,


where to store informatica rejected data? How to extract the informatica rejected data?

0 Answers  


generate Unique sequence numbers for each partition in session with Unconnected Lookup ? Hi All, Please help me to resolve the below issue while Applying partitioning concept to my Session. This is a very simple mapping with Source, Lookup , router, and target. I need to Lookup on the target and compare with the source data, if any piece of data is new then Insert, and If any thing change in the existed data then Update. while Inserting the new records to the target table I'm generating sequence numbers with Unconnected lookup, by calling the maximum PK ID from the target table. The above flow is working fine from last one year. Now I wish to apply the Partitioning concept to the above floe(session) At source I used 4 pass through partitions.(For Each partition different filter conditions to pull the data from source) at Target I used 4 passthrough Partitions. it is working fine for some data, but for some rows for Insert Operation , it is throwing Unique key errors, because while Inserting the data it is generating the same sequence key twice. In detail : 1st row is coming from 1st partition and generated the sequence number 1 for that row. 2nd row is coming from 1st partition and generated the sequence number 2 for that row 3rd row is coming from the 2nd partition generated the sequence number 2 again for that row. (it must generate 3 for this row) the issue is becuase of generating the same sequence numbers twice for different partitions. Can any one Please help me to resolve this issue. While Applying partitions how can I generate a Unique Sequence numbers from Unconnected lookup for Each partitioned data. Regrads, N Kiran.

2 Answers   Tech Mahindra,


What are the reusable transformations?

0 Answers   Informatica,


Explain dynamic target flat file name generation in informatica

0 Answers   Informatica,


I have data like sno mailid 1 subbu@dell.com 2 arthi@dell.com 3 thiru@dell.com .. ..... like this for N no.of how we will send a message 'meet hr' at a time in windows environment by the informatica..

2 Answers   DELL,


Categories