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
Answer Posted / 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 |
Post New Answer View All Answers
Design time, run time. If you don't create parameter what will happen
I have three same source structure tables. But, I want to load into single target table. How do I do this? Explain in detail through mapping flow.
Please let me know how to make Data masking in informatica..
Explain pmcmd command usage in informatica
What are the differences between source qualifier and joiner transformation?
How to elaborate powercenter integration service?
What is the commit type if you have a transaction control transformation in the mapping?
have u done any performance tuning? how u ll do?
What is rank transform?
What happens when a session fails and you click on recover?
Clarify the aggregator change?
How can informatica be used for an organization?
What is a mapplet/worklet in informatica?
Define mapplet?
What is a repository manager?