Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Query

Status
Not open for further replies.

mozingod

MIS
Jul 9, 2002
227
US
Is there a way to know if duplicates of a record exsist after they've been surpressed with DISTINCT? So if there were I could link to another page to show all the results? Thanks. Darrell Mozingo
 
I know you can accomplish what you are looking for but don't know the SQL for it.

Try asking in the SQL Server forum.
Thanks,

Gabe
 
You can first group by the fields from which you want the records to be unique. then add a field count(*) to retrieve the no. of rows in the group.

so this way you would be able to find out the no. of rows duplicate.

Such as :-

Select City,Weather,Count(*) as [No. of Common Rows] from tblCity Group by City,Weather

Darpan Gogia
darpan.kumar@india.birlasoft.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top