![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a "union" table which results of a union of two tables. Occasionally I could have duplicates, when the same PIN has been added to both tables, albeit at different Datees/Times, such as: PIN Name Added Date 100411 A 7/11/2007 10:12:58 AM 100411 A 7/17/2007 10:54:23 AM 100413 B 7/11/2007 10:13:28 AM 100413 B 7/17/2007 10:54:39 AM 104229 C 7/6/2007 2:34:13 PM 104231 D 7/6/2007 2:34:25 PM 104869 E 6/10/2007 11:59:12 AM 104869 E 6/22/2007 2:40:18 PM The question is - how can I delete by queries the first occurence (time-wise) of these duplicates - i.e. I would want to delete the first occurence of 100411 (A), the first occurence of 100413 (B), and the first occurence of 104869 (E) in the example above - records C and D show only once, so they are fine. Is there a MsAccess solution ? Is there a SQL-server solution ? |
#3
| |||
| |||
|
|
Hi. I have a "union" table which results of a union of two tables. Occasionally I could have duplicates, when the same PIN has been added to both tables, albeit at different Datees/Times, such as: PIN Name Added Date 100411 A 7/11/2007 10:12:58 AM 100411 A 7/17/2007 10:54:23 AM 100413 B 7/11/2007 10:13:28 AM 100413 B 7/17/2007 10:54:39 AM 104229 C 7/6/2007 2:34:13 PM 104231 D 7/6/2007 2:34:25 PM 104869 E 6/10/2007 11:59:12 AM 104869 E 6/22/2007 2:40:18 PM The question is - how can I delete by queries the first occurence (time-wise) of these duplicates - i.e. I would want to delete the first occurence of 100411 (A), the first occurence of 100413 (B), and the first occurence of 104869 (E) in the example above - records C and D show only once, so they are fine. Is there a MsAccess solution ? Is there a SQL-server solution ? Thank you very much ! Alex |
![]() |
| Thread Tools | |
| Display Modes | |
| |