VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



This code always you to locate duplicates in SQL Server It has been tested using SQL Server 2000. I

by Kevin Luckett (2 Submissions)
Category: Databases/Data Access/DAO/ADO
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Thu 8th September 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

This code always you to locate duplicates in SQL Server It has been tested using SQL Server 2000. It should work with all versions

Rate This code always you to locate duplicates in SQL Server It has been tested using SQL Server 2000. I



select * from [Table Name] where [Column Name] in( select [Column Name] from
[Table Name] group by [Column Name]having Count(*) > 1)


Example:
select * from tbl_lot where lotid in ( select lotid from
 tbl_lot group by lotid having Count(*) > 1)

Download this snippet    Add to My Saved Code

This code always you to locate duplicates in SQL Server It has been tested using SQL Server 2000. I Comments

No comments have been posted about This code always you to locate duplicates in SQL Server It has been tested using SQL Server 2000. I. Why not be the first to post a comment about This code always you to locate duplicates in SQL Server It has been tested using SQL Server 2000. I.

Post your comment

Subject:
Message:
0/1000 characters