Wednesday, March 7, 2012

removing duplicated rows

Hi,
Need to remove the duplicated rows from a table which has text/ntext/image type columns. The table does not have any PK/Unique column. (I accept its a bad data model). But currently changing the data model is not possible. Hence doing changes in application.
I couldn't do 'SELECT DISTINCT * from table', since the table has text columns. Though there is no PK constraint, If I know that col1 and col2 are join PKs in the table, Is that possible to select the distinct rows from such a table.
Please advise,
Thanks,
Smithahttp://www.aspfaq.com/2431

wrote in message

news:e3d0a7da-ac87-46f8-a9c5-008fbcb4cd8d@.discussions.microsoft.com...

> Hi,

>

> Need to remove the duplicated rows from a table which has

> text/ntext/image type columns. The table does not have any PK/Unique

> column. (I accept its a bad data model). But currently changing the data

> model is not possible. Hence doing changes in application.

>

> I couldn't do 'SELECT DISTINCT * from table', since the table has text

> columns. Though there is no PK constraint, If I know that col1 and col2

> are join PKs in the table, Is that possible to select the distinct rows

> from such a table.

>

> Please advise,

>

> Thanks,

> Smitha

>

>

No comments:

Post a Comment