HI
I have a source table that contains the different kind of the 10 departments information is available.
I need to retrieve and load the alternative records from the each department.
EX OF DATA: employee table contains the different departments like, savings department,current department,fixed department
each department having 100 records, i want retrive the alternative records from each department.
could any one help me the logic to implement.
thanx in advance
Suma
How to retrieve the alternative records from each department
Moderators: chulett, rschirm, roy
How to retrieve the alternative records from each department
Last edited by DWH-M on Mon Apr 18, 2011 3:53 am, edited 1 time in total.
Assume you have department called : savings department
Hope your input and output as below:
Input:-
Emp name Emp Sal
A 10
B 20
C 292
D 99
Output:-
Emp name Emp Sal
A 10
C 292
If so, you can use below logic:-
Oracle stage ---> Transformer---> DS
In Transformer just add one sequence number for all the records
something like that :
Emp name Emp Sal Record number
A 10 1
B 20 2
C 292 3
D 99 4
Assign this to DS.
Use Another job or in the same job - to read DS and then use Transformer
Keep this constrint :
Mod(Record_number, 2) = 1
Now you will get only alternative records:
Something like this:
Emp name Emp Sal
A 10
C 292
Hope your input and output as below:
Input:-
Emp name Emp Sal
A 10
B 20
C 292
D 99
Output:-
Emp name Emp Sal
A 10
C 292
If so, you can use below logic:-
Oracle stage ---> Transformer---> DS
In Transformer just add one sequence number for all the records
something like that :
Emp name Emp Sal Record number
A 10 1
B 20 2
C 292 3
D 99 4
Assign this to DS.
Use Another job or in the same job - to read DS and then use Transformer
Keep this constrint :
Mod(Record_number, 2) = 1
Now you will get only alternative records:
Something like this:
Emp name Emp Sal
A 10
C 292
Jothi
-
- Participant
- Posts: 152
- Joined: Mon Mar 07, 2011 6:16 am