var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Hi I am trying to find all the duplicates in the School_tbl because from what I see there is allot how would I go about dong that
and then once I find them how do I delte them all at once
SELECT COUNT([Student ID]) AS StudentIDSchool, [School Name], [School Phone], [School Address], [School City], [School State], [School Zip]FROM School_tblGROUP BY [School Name], [School Phone], [School Address], [School City], [School State], [School Zip]
desireemm, what do you consider a duplicate? Having [Student ID] in the table more than once? Here is a basic way to find duplicates:
The key part is the HAVING clause. This will filter rows AFTER the GROUP BY (as opposed to the WHERE clause which will filter BEFORE the GROUP BY).
SELECT [Student ID], COUNT(*) AS CNT
GROUP BY [Student ID]
HAVING COUNT(*) > 1
Hopefully this will point you in the right direction to get the result that you want.
if ur using 2005 and above use row_number
select * from (select * , row_number()over(partition by studentid order by studentid) as rid from urtablename)s where rid > 1