![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I am trying to use DTS to copy from an Excel file to a table (SQL 2000). The table has a primary key (say ID). As might be expected, when a duplicate key is detected, it terminates the copy. With Access one could use First/INTO/Group and have the copy just skip the duplicate. I cannot use DISTINCT since the key may be duplicated but the name might not be. How does on accomplish this using SQL Server? Thanks. |
#3
| |||
| |||
|
|
The problem here then is that what one system calls a key is not what the other one defines as a key.. In the Access method surely you are ignoring rows of data. How do you decide which row with the same key is for the chop or is it arbitrary? You can do this a number of ways and these range from using Lookups within the pump to see if you already have the value in the destination to pumping to a working table and then using something like MIN or MAX to get a row with the same key value. There are other ways as well. |
![]() |
| Thread Tools | |
| Display Modes | |
| |