Duplicate Records
Moderators: chulett, rschirm, roy
Duplicate Records
Hai,
I have one problem. I need to check duplicate record from two column.
If it is duplicate record, that record store in to Error Table.
Ex:
Name Age
Raj 25
kamal 45
vinodh 40
Raj 25
Now , the dublicate record is Raj. This Raj record is send to the Error
Table.
How can i do that. Can any one help me?.
Regards,
prabu
I have one problem. I need to check duplicate record from two column.
If it is duplicate record, that record store in to Error Table.
Ex:
Name Age
Raj 25
kamal 45
vinodh 40
Raj 25
Now , the dublicate record is Raj. This Raj record is send to the Error
Table.
How can i do that. Can any one help me?.
Regards,
prabu
-
- Participant
- Posts: 24
- Joined: Mon Jul 24, 2006 12:30 am
My condition is that dupicate records store in to the Error Table (
Target_Sequential file) help me the query. If i use Aggregator Stage, is
it show the duplicate records separately. Otherwise, if any condition for
this, can u . I need two check these two colums AcctCode and DeptCode
give me the query.
Regards,
prabu
Target_Sequential file) help me the query. If i use Aggregator Stage, is
it show the duplicate records separately. Otherwise, if any condition for
this, can u . I need two check these two colums AcctCode and DeptCode
give me the query.
Regards,
prabu
You don't write a query in transformer. Its the place where you do the transformation.
Take two stage variables
Prev_Row
Curr_Row
Set Curr_Row to Col1 : Col2
Constraint for the Target Link
Curr_Row<>Prev_Row
Constraint for the Error Link
Curr_Row=Prev_Row
Then set
Prev_Row=Curr_Row
It should give you the outline of how you should proceed.
Take two stage variables
Prev_Row
Curr_Row
Set Curr_Row to Col1 : Col2
Constraint for the Target Link
Curr_Row<>Prev_Row
Constraint for the Error Link
Curr_Row=Prev_Row
Then set
Prev_Row=Curr_Row
It should give you the outline of how you should proceed.
Success consists of getting up just one more time than you fall.
i tried ur ida. But it is not work. I tried Like that.
PrevRow -----------------> AccCode
CurrRow ------------------> DeptCode
Then Set in constraints
Error Records:
CurrRow=PrevRow
Good Records:
CurrRec<>PrevRec
In Error Records Link did not show any records. It is showing only Zero
Records. Can u help me other one.
PrevRow -----------------> AccCode
CurrRow ------------------> DeptCode
Then Set in constraints
Error Records:
CurrRow=PrevRow
Good Records:
CurrRec<>PrevRec
In Error Records Link did not show any records. It is showing only Zero
Records. Can u help me other one.
Hai lovejo,
I also tried what u said. But still it is not work.
what i did there. (Acc Code and Dept Code)
Stage Variable:
Prev Row--------------------> Acc Code
Curr Row---------------------> Acc Code : Dept Code
In Constraints:
Good Records:
CurrRow<> PrevRow
Error Records:
CurrRow = PrevRow
I tried what u said. But still it show zero record in Error Table. I dont
know that why it is show. If i did any mistake, can u help me where i did
make mistake and How can i correct it. plz Help me.
I also tried what u said. But still it is not work.
what i did there. (Acc Code and Dept Code)
Stage Variable:
Prev Row--------------------> Acc Code
Curr Row---------------------> Acc Code : Dept Code
In Constraints:
Good Records:
CurrRow<> PrevRow
Error Records:
CurrRow = PrevRow
I tried what u said. But still it show zero record in Error Table. I dont
know that why it is show. If i did any mistake, can u help me where i did
make mistake and How can i correct it. plz Help me.
Prabhu,praburaj wrote:Hai lovejo,
I also tried what u said. But still it is not work.
what i did there. (Acc Code and Dept Code)
Stage Variable:
Prev Row--------------------> Acc Code
Curr Row---------------------> Acc Code : Dept Code
In Constraints:
Good Records:
CurrRow<> PrevRow
Error Records:
CurrRow = PrevRow
I tried what u said. But still it show zero record in Error Table. I dont
know that why it is show. If i did any mistake, can u help me where i did
make mistake and How can i correct it. plz Help me.
As lovejha mentioned have two stage variables.
1.IsReject ---> if link.AccCode:link.DeptCode = PrevRow Then 1 Else 0
2.PrevRow----> link.AccCode:link.DeptCode
In the error link constraints:
IsReject = 1
In the other link:
IsReject = 0