source
name sal
aaaa 2000
bbbb 3000
abcd 5000


Target
name sal
aaaa 2000
bbbb 3000
abcd 5000
total 10000


how to get total as new row and sum as 10000

thanks

Answers were Sorted based on User's Feedback



source name sal aaaa 2000 bbbb 3000 abcd 5000 Target name sal aaaa ..

Answer / babu

Hi,
Mapping:

SRC==>EXP==>AGGR==>UNION
|==>TRG
SRC==>

EXP:In first DFD we have EXPR and AGGr,in EXPR we have to
take one output port with a constant value by using that
output port calculate the sum sal in AGGR.In AGGR take one
output port that as name field with constant value(total)
and the sum sal field as sal after that UNION trns is there
union the two DFD's,finally we get the what we expect.

Is This Answer Correct ?    7 Yes 1 No

source name sal aaaa 2000 bbbb 3000 abcd 5000 Target name sal aaaa ..

Answer / kulasekhar reddy tholeti

Try it 100% you will get answer.

Select name,no from source
union
select "total",sum(sal) from source;

Is This Answer Correct ?    1 Yes 0 No

source name sal aaaa 2000 bbbb 3000 abcd 5000 Target name sal aaaa ..

Answer / chinthi

actually i need total as new record value as 10000

Is This Answer Correct ?    0 Yes 0 No

source name sal aaaa 2000 bbbb 3000 abcd 5000 Target name sal aaaa ..

Answer / babu

Hi Chinthi
You will do the above mapping,definely you can get
whatever you want.


Please check and intimate in case of any issues.

dwarak.vbr@gmail.com

Is This Answer Correct ?    0 Yes 1 No

Post New Answer

More Informatica Interview Questions

what are the best practices to extract data from flat file source which are bigger than 100 mb memory?

0 Answers   Wipro,


What is Code Page Compatibility?

1 Answers  


Please let me know how to make Data masking in informatica..

0 Answers  


Hello...... How can i set my mapping as read-only? Please answer me. Advance thanks

4 Answers  


write sql query following table amount year quarter 1000 2003 first 2000 2003 second 3000 2003 third 4000 2003 fourth 5000 2004 first 6000 2004 second 7000 2004 third 8000 2004 fourth i want the output year q1_amount q2_amount q3_amount q4_amount 2003 1000 2000 3000 4000 2004 5000 6000 7000 8000 can anybady help me to achieve the aboue result by using informatica. thanks in advance.

5 Answers  






What is difference between stored procedure transformation and external procedure transformation?

2 Answers  


How to delete duplicate records in a flat file source?

2 Answers  


what is filelist concept in informatica

4 Answers  


can we see default group,when we use router?if yes how?

2 Answers   L&T,


Explain sessions and how many types of sessions are there?

0 Answers  


What is a unit Testing?

1 Answers  


What are the different types of Type2 dimension maping?

1 Answers  


Categories