Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are the static cache and dynamic cache in informatica?

1193


How might one distinguish in the case of mapping is right or not without associating session?

1124


Explain the informatica workflow?

1074


What is standalone command task?

1318


How can you validate all mappings in the repository simultaneously?

1371


explain any diffcult scenario that u have faced in your experience... or explain any complex maping u have developed?

2160


How can we delete duplicate rows from flat files?

1223


What are the settings that you use to configure the joiner transformation?

1055


hi real timers . iam waiting for ur reply regarding ETL TESTING

2271


During the running session, output files are created by informatica server. Enlist few of them.

982


Define the various join types of joiner transformation?

988


In how many ways we can create ports?

1123


What are the differences between oltp and olap?

972


SOURCE DATA IS DISPLAY IN THIS FORMATE IN TARGET . WHAT BUSINESS LOGIC WE CAN APPLY. source table target table ------------ ------------ c1 c2 c3 c1 c2 c3 -- -- -- -- -- -- 1 A J 1 2 B K 2 A 3 C L 3 B J 4 D M 4 C K 5 E N 5 E L F M N

2132


Explain pushdown optimization and types in informatica

1079