write sql query following source table

jan feb mar apr
100 200 300 400
500 600 700 800
900 100 200 300
i want the output format like

month total
jan 1500
feb 900
mar 1200
apr 1500

Answers were Sorted based on User's Feedback



write sql query following source table jan feb mar apr 100 200 300 400 500 600 700..

Answer / chanakya123

Hi, Using UNION ALL ,You can achieve it, here is Your Query

SELECT 'JAN' AS MONTH, SUM(JAN) AS TOTAL FROM SRC_MONTHS
UNION ALL
SELECT 'FEB' AS MONTH, SUM(FEB) AS TOTAL FROM SRC_MONTHS
UNION ALL
SELECT 'MAR' AS MONTH, SUM(MAR) AS TOTAL FROM SRC_MONTHS
UNION ALL
SELECT 'APR' AS MONTH, SUM(APR) AS TOTAL FROM SRC_MONTHS

Thanks
Kalyan Sankuthula

Is This Answer Correct ?    23 Yes 0 No

write sql query following source table jan feb mar apr 100 200 300 400 500 600 700..

Answer / triveni

i have one doubt.how to convert source to columns using sourcequalifier. how many columns target we have take.
how to connect source to target
source has 4 columns
target has 2 columns

Is This Answer Correct ?    0 Yes 0 No

write sql query following source table jan feb mar apr 100 200 300 400 500 600 700..

Answer / amitabha mandal

use "Normalizer"

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Informatica Interview Questions

Define sessions in informatica etl?

0 Answers  


What is informatica worklet?

0 Answers  


how to use incremental load?

2 Answers   TCS,


As per Informatica PC help guide, while adding transformations to a mapplet,we have to keep this in mind: If you use a Sequence Generator transformation, you must use a reusable Sequence Generator transformation. May i know the reason behind this?

2 Answers  


wat s mapping parameter and mapping variable? how do you set that in a mapping?

3 Answers  






How do you Merge multiple Flat files for example 100 flat files with out using Union T/F

4 Answers   IBM,


Explain what are the different types of transformation available in informatica. And what are the mostly used ones among them?

0 Answers  


What could be the possible resons of locks by user?

0 Answers  


What are the advantages of using informatica as an etl tool over teradata?

0 Answers  


Can you use flat files in Mapplets.

0 Answers  


what is confirmed fact?

2 Answers  


Explain grouped cross tab?

1 Answers   Accenture,


Categories