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
Answer / annu
select decode(gender,'female',name) FEMALE,
decode(gender,'male',name) MALE from src;
Is This Answer Correct ? | 1 Yes | 0 No |
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 |
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 |
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 |
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 |
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 |
Answer / anwar
select name,
decode(gender,'male','MALE',
'female','FEMALE')GENDER from sOURCE;
Is This Answer Correct ? | 0 Yes | 1 No |
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 |
have you developed documents in your project? and what documents we develop in realtime?
If u r giving different parameter file names in workflow and session for a single mapping parameter, then which one will be executed? The one u given in workflow or the one u given in the session?
wat transf shud i use to achieve this id sal id sal sum src-1 20 tgt 1 20 40 1 20 1 20 40 2 15 2 15 35 2 20 2 20 35
HOw can we load the normalised data ( Vertical data) to (Horizontal data)with out using decode in the expression transformation and the aggregator transformation. But, what exactly I want is .. If we have million of records,it is not possible using decode and search for that Particular Id to pivot into Horizontal data... Can any one of guys please help me in this regard.....
Difference between task flow and linear task flow
select count(1) from emp? what is the o/p?
What can we do to improve the performance of informatica aggregator transformation?
Hi, This is Ranadheer. How to load fact tables using dimeension tables. Please anyone give me a answer with example. Thanks in Advance.
i have an aggregater in my mapping and no group by port on any column and i ampassing 100 rows through aggregater,so how many rows i will get as out put from aggregater
What are the new features in Informatica 5.0?
can any one explain about dataflow in the informatica project for bank domain....thanks is advance
how tokens will generate?