From: Plamen Ratchev on
In that case it will be more difficult. I would suggest to alter the table and add primary key column(s) to identify
each row uniquely. Otherwise you are up to some tricky SQL to add IDENTITY column and based on that remove duplicates.
Or insert all rows into another table using DISTINCT and then drop the original table and rename the new table to the
original name.

--
Plamen Ratchev
http://www.SQLStudio.com
From: fniles on
> I would suggest to alter the table and add primary key column(s) to
> identify each row uniquely
How do I identify the rows that are not unique during the table alteration ?
When I tried to add the primary key consisting of SequenceNumber and Symbol,
it gave me the error that says some records are not unique, or something
like that.


"Plamen Ratchev" <Plamen(a)SQLStudio.com> wrote in message
news:cPednYQy04WxW0jWnZ2dnUVZ_gCdnZ2d(a)speakeasy.net...
> In that case it will be more difficult. I would suggest to alter the table
> and add primary key column(s) to identify each row uniquely. Otherwise you
> are up to some tricky SQL to add IDENTITY column and based on that remove
> duplicates. Or insert all rows into another table using DISTINCT and then
> drop the original table and rename the new table to the original name.
>
> --
> Plamen Ratchev
> http://www.SQLStudio.com


From: Plamen Ratchev on
You have to add another attribute to make the combination unique. Or just clean up the data as I explained, by inserting
into new table using DISTINCT. When data is clean add UNIQUE constraint (or PRIMARY KEY) on {SequenceNumber, Symbol}.

--
Plamen Ratchev
http://www.SQLStudio.com
From: fniles on
Thanks

"Plamen Ratchev" <Plamen(a)SQLStudio.com> wrote in message
news:qpqdnYDzYszOY0jWnZ2dnUVZ_qcAAAAA(a)speakeasy.net...
> You have to add another attribute to make the combination unique. Or just
> clean up the data as I explained, by inserting into new table using
> DISTINCT. When data is clean add UNIQUE constraint (or PRIMARY KEY) on
> {SequenceNumber, Symbol}.
>
> --
> Plamen Ratchev
> http://www.SQLStudio.com