Converting Rows to columns
I have Relational source like his.
JAN FEB MAR APR
100 200 300 400
500 600 700 800
900 100 200 300

I need to convert these rows into columns to the targe.

MONTH TOTAL
JAN 1500
FEB 900
MAR 1200
APR 1500

Please experts help me

Answer Posted / dilip ingole

using query

SELECT 'JAN' AS MONTHS,SUM(JAN) FROM CALADERQUERY
UNION
SELECT 'FEB' AS MONTHS,SUM(FEB) FROM CALADERQUERY
UNION
SELECT 'MAR' AS MONTHS,SUM(MAR) FROM CALADERQUERY
UNION
SELECT 'APR' AS MONTHS,SUM(APR) FROM CALADERQUERY;

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to convert a row into column and a column into rows? Name all DTM threads. What all threads stop when we issue STOP or ABORT? How to pass the value of a data(variable kind of) from one session ( generated in mapping) to another session in the same workflow... What are the tyoes of partitioning you know and how to apply them in real time ... Can partitioning be applied to expression transformation and how

1117


What is enterprise data warehousing?

601


have u done any performance tuning? how u ll do?

1849


Can we use the mapping parameters or variables created in one mapping into any other reusable transformation?

797


How to update source definition?

619






How we can create indexes after completing the load process?

603


what is SDLC way of code development?

1548


Workflow is long running due to long running sql query so when we refer the query plan it tells the issue is due to partition of the db table. How to handle this?

1224


What is pmcmd command?

662


Mention few power centre client applications with their basic purpose?

525


What is an Integration service in Informatica?

693


How can one identify whether mapping is correct or not without connecting session?

865


Explain the various test procedures used to check whether the data is loaded in the backend, performance of the mapping, and quality of the data loaded in informatica?

543


What do you mean by DTM and Load manager and what is difference between load manager and load balancer?

622


In informatica workflow manager, how many repositories can be created?

769