capture duplicate data
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 30
- Joined: Sat Oct 25, 2008 9:09 pm
- Location: chennai
capture duplicate data
Hi,
1. I have a source like
id name sal
1 aaa 1000
2 bbb 2350
1 aaa 1700
3 ccc 3690
1 aaa 4000
2 bbb 3000
in target duplicate records must be caputure
1 aaa 1000
1 aaa 1700
2 bbb 2350
How to solve it?
2. How to capture only the Duplicate record for source using SQL query?
1. I have a source like
id name sal
1 aaa 1000
2 bbb 2350
1 aaa 1700
3 ccc 3690
1 aaa 4000
2 bbb 3000
in target duplicate records must be caputure
1 aaa 1000
1 aaa 1700
2 bbb 2350
How to solve it?
2. How to capture only the Duplicate record for source using SQL query?
priya
-
- Participant
- Posts: 2
- Joined: Wed Nov 19, 2008 1:01 am
Re: capture duplicate data
[quote="rmeenakumari822"]Hi,
1. I have a source like
id name sal
1 aaa 1000
2 bbb 2350
1 aaa 1700
3 ccc 3690
1 aaa 4000
2 bbb 3000
in target duplicate records must be caputure
1 aaa 1000
1 aaa 1700
2 bbb 2350
How to solve it?
2. How to capture only the Duplicate record for source using SQL query?[/quoteUse remove duplicates stage and get rejects as your output..
1. I have a source like
id name sal
1 aaa 1000
2 bbb 2350
1 aaa 1700
3 ccc 3690
1 aaa 4000
2 bbb 3000
in target duplicate records must be caputure
1 aaa 1000
1 aaa 1700
2 bbb 2350
How to solve it?
2. How to capture only the Duplicate record for source using SQL query?[/quoteUse remove duplicates stage and get rejects as your output..
-
- Participant
- Posts: 30
- Joined: Sat Oct 25, 2008 9:09 pm
- Location: chennai
Re: capture duplicate data
Hi,
by using remove duplicate stage duplicate data will be removed but i want to caputured the duplicate data to one target table how?
by using remove duplicate stage duplicate data will be removed but i want to caputured the duplicate data to one target table how?
priya
-
- Participant
- Posts: 30
- Joined: Sat Oct 25, 2008 9:09 pm
- Location: chennai
Re: capture duplicate data
Hi,
by using remove duplicate stage duplicate data will be removed but i want to caputured the duplicate data to one target table
how to solve it?
by using remove duplicate stage duplicate data will be removed but i want to caputured the duplicate data to one target table
how to solve it?
priya
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Search - this question has been answered at least twice in the past.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Capture duplicate data
Hi ,
SELECT COUNT(1), COLUMN_NAME
FROM TABLE_NAME
GROUP BY COLUMN_NAME
HAVING COUNT(1) > 1
hope this might help you.
thanks
fareeda
SELECT COUNT(1), COLUMN_NAME
FROM TABLE_NAME
GROUP BY COLUMN_NAME
HAVING COUNT(1) > 1
hope this might help you.
thanks
fareeda
Thanks
-
- Participant
- Posts: 34
- Joined: Mon May 05, 2008 1:31 am
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
But it will not preserve the original rows. This design will. Filter on count < 4.
Code: Select all
source ---> Copy ---> Join ---> Filter ---> target
| ^
| |
+--> Aggregator
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.