Import Error

  • Thread starter Thread starter draftycompguy
  • Start date Start date
D

draftycompguy

I have imported a file from excel. I am trying to make a field the primary
key but I get an error saying there are duplicate values. I have tried to
change the indexing tab bu that doesn't work. Is there a way I can make this
field the primary key and get rid of one of the duplicates without going
through all 1,500 fields?
 
I have imported a file from excel.  I am trying to make a field the primary
key but I get an error saying there are duplicate values.  I have triedto
change the indexing tab bu that doesn't work.  Is there a way I can make this
field the primary key and get rid of one of the duplicates without going
through all 1,500 fields?

what happens if you do a SELECT DISTINCT on the field you are trying
to set as the primary key? If you move those conflicting records to a
separate table, you can then create the primary key. Makes perfect
sense, though. Primary keys are unique by definition, and if the data
in the column(s) that make up the primary key are not unique, then you
have to do something to the data. (or add more columns to the primary
key).
 
Back
Top