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...


following source
name gender
ramya female
ram male
deesha female
david male
kumar male
i want the target

male female
ram ramya
david deesha
kumar

any body give solution above question?

Answers were Sorted based on User's Feedback



following source name gender ramya female ram male deesha female david male kumar male i wa..

Answer / annu

select decode(gender,'female',name) FEMALE,
decode(gender,'male',name) MALE from src;

Is This Answer Correct ?    1 Yes 0 No

following source name gender ramya female ram male deesha female david male kumar male i wa..

Answer / voma

use router transformation, In that 2 groups
1 is male, 2 is female,
target is single, but we drag the table twice

In that router 1st group condition
select * from table where gender='male'
2nd group condition
select * from table where gender='female'

Is This Answer Correct ?    2 Yes 2 No

following source name gender ramya female ram male deesha female david male kumar male i wa..

Answer / moorthy g

Source-SQ-Exp-Rtr-Tgt(twice)
Exp:
Flag: DECODE(True, gender='MALE', 'Y','N')
RTR:
Make It Two Group
Flag value is Y then Male is one group.
Defaull is Female

Tgt:
Make It Two;
male - Tgt1
female - Tgt2
=================

Is This Answer Correct ?    2 Yes 2 No

following source name gender ramya female ram male deesha female david male kumar male i wa..

Answer / jaspreet banga

after source qualifier, Use an expression transformer , in
that take an variable port name 'FLAG', and in that use the
decode function as 'FLAG = DECODE(GENDER=MALE,'M','F')'.
after that place an router transformer and for each flag
condition use seperate instance of target and hence you
will get what you want.

Is This Answer Correct ?    0 Yes 0 No

following source name gender ramya female ram male deesha female david male kumar male i wa..

Answer / krishna

select * from (select distinct name male from fm where
gender='male'),(select distinct name female from fm e
where gender='female');

select decode(gender,'female',name)female,decode
(gender,'male',name)male from fm ;

Is This Answer Correct ?    3 Yes 4 No

following source name gender ramya female ram male deesha female david male kumar male i wa..

Answer / murali udayagiri

You can use the below query in SQ trans if the source is
relational, if not u can do it in expr trans.

select coalesce((case when gender='male' then ename
end),',')||','||
coalesce((case when gender='female' then ename
end),'###') "male,female" from temp_emp1;


Thanks,
Murali Udayagiri

Is This Answer Correct ?    0 Yes 1 No

following source name gender ramya female ram male deesha female david male kumar male i wa..

Answer / anwar

select name,
decode(gender,'male','MALE',
'female','FEMALE')GENDER from sOURCE;

Is This Answer Correct ?    0 Yes 1 No

following source name gender ramya female ram male deesha female david male kumar male i wa..

Answer / star

Not sure if this has to be solved by SQL or by informatica -
and source is a table or file.

select * from (select lead(gender,0,0) over (partition by
gender), lead(gender,1,0) over (partition by gender) from
table1) where rownum=1
union all
select t1.name, t2.name from
(select name,row_number() over (partition by name) from
table1 where gender='male') t1,
(select name,row_number() over (partition by name) from
table1 where gender='female') t2
where
t1.name(+) = t2.name(+)

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Informatica Interview Questions

What is router transformation

4 Answers   CSC,


Difference between Data and Index Caches?

0 Answers   Informatica,


If I have router with 10 records, if the condition doesn’t satisfy the records will pass to the default group,then where can we see that records and where that records will store?

4 Answers  


can you use flat file for lookup table?why?

2 Answers   HCL,


CAN WE IMPLEMENT SCD TYPE 1 AND SCD TYPE 2 IN SAME MAPPING? IF SO HOW?

6 Answers  


In a scenario I want to change the dimensions of a table and normalize the denomralized table which transformation can I use?

4 Answers  


What are the phases in SDLC?

3 Answers  


What is the Difference between sorter and aggregator?

2 Answers  


why union transformation is active transformation?

6 Answers   IndiGo, TCS,


Label in Informatica. How to remove existing Label.

1 Answers   IBM, Infosys,


I have one source table and three target tables. When the session runs for the first time involving the mapping,i want that the loading should take place in 1st Target table only. The 2nd time the same session runs the loading should take place in 2nd Target only only and similarly when the session runs for the 3rd time loading should take place in Third only. And again when the session runs for the 4th time loading should take place in 1st Target table.

4 Answers   Cap Gemini, IBM,


Reusable transformation and shortcut differences

0 Answers  


Categories