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

In ur current projectu have done any performance tuning of mappings?

1 Answers  


How to create or import flat file definition in to the warehouse designer?

0 Answers   Informatica,


my session have to run Monday to Saturday not run sunday how to sedule in informatica level?

1 Answers   Infinite Computer Solutions,


Q. Informatica workflow, it is running beyond two hours for last couple of runs, normally it completed less then 30 min., hardly 40 min, last couple of run crossing 2 hours and more in that workflow only one session. now it is aasign to you that how to idenitfy the performance issue of the sesion of production.

0 Answers  


In indirect file loading, suppose we have less no.of flat files then we can enter files names manually in list file creation. If millions of files are there, how can we enter the flat file names in list file?

1 Answers   HP,






what is galaxy repository?

2 Answers  


How can repository reports be accessed without sql or other transformations?

0 Answers  


What if the source is a flat-file? Then how can we remove the duplicates from flat file source?

1 Answers  


State the limitations where we cannot use joiner in the mapping pipeline?

0 Answers  


How many joins in Informatica

5 Answers   CSC,


How to use procedural logic inside infromatica? If yes how, if now how can we use external procedural logic in informatica?

0 Answers  


how to obtain performance data for individual transformations.

2 Answers  


Categories