How to get EVEN & ODD numbers separately?
Answers were Sorted based on User's Feedback
Answer / amedela chandra sekhar
By using the condition in router transformation
drop the required ports into router t/r
add one group
even mod(empno,2)=0 ------Target1
defaultgroup -------------Target2
| Is This Answer Correct ? | 8 Yes | 1 No |
Answer / raghava
data one;
input number 10.;
datalines;
10
11
12
13
14
15
16
17
18
19
20
;
run;
data two;
set one;
if mod(number,2)=0 Then A=number; else B=number;
/* number=mod(number);*/
run;
| Is This Answer Correct ? | 7 Yes | 0 No |
Answer / tejeya
By using the Sequence generator and Mod() in Expression tfn.
| Is This Answer Correct ? | 9 Yes | 6 No |
There are many ways....
1) Using the sql override in the source qualifier. To find
the even and odd. Add another column to flag the even and
odd.Like
select ID,decode( id/2,0,'E','O') FLAG FROM TABLE_NAME;
Using the router we can send them into two seperate target
tables.
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / amedela chandra sekhar
for above answer
Remember empno should be like
1
2
3
4
5
6
7
8
9
other wise drag nextval port from sequence generator to
union t/r give condition like mod(nextval,2)0
| Is This Answer Correct ? | 3 Yes | 0 No |
Answer / prasad
no
1
2
3
4
5
6
7
8
9
10
i wrote a condition in transformer if mod(no,2)=0 Then B else A
Target
A
1
3
5
7
9
Target
B
2
4
6
8
10
| Is This Answer Correct ? | 4 Yes | 1 No |
Answer / vali
by using the condition in expression transformation
mod(empno) .the output given torouter t/r. if the o.p is
zero given to one group and if one given to default group..
| Is This Answer Correct ? | 1 Yes | 2 No |
Answer / usha
by using Sequence Generator transformation we can get even
to one target and odd to other target
end valu=2
cycle should enable
start val=1
curr value=1
s-->sq-->seq-->RTR-->t1-->t2
| Is This Answer Correct ? | 1 Yes | 2 No |
I have in my source Records like 100,101,102 etc. I have router transformation which has groups like one group is empno=100, second group is empno>99. Now i want to know my source record 100 loads into which group?
suppose if we have dublicate records in a table temp n now i want to pass unique values to t1 n dublicat values to t2 in single mapping using aggregator & router? how
Hi, Can someone send me the DWH and Informatica FAQ's at vanibv6@gmail.com Thanks in Advance, Vani
how remove 1st 3 records & last 3 records in informatics
Explian the Process of deployment groups in informatica
S1 is having 1 lakh records and s2 is having 100 records, s2 should compare s1 if emp no is same data should be updated if not their it should insert the data.what are the transformation used?
What are the informatica performance improvement tips
there is a comma separated flat file as source and there is a column in that one field is having space like "rama krishna" like that what happens when this is used as source
Dimension Object created in Oracle can be imported in Designer Cubes contain measures
what is the function of 'F10' informatica ?
Write the unconnected lookup syntax and how to return more than one column.
What is joiner transformation?