-----------------------------------------------------------

New Message on BDOTNET

-----------------------------------------------------------
From: Prasanna_kakanoor
Message 4 in Discussion

Hi, 

 Here is the query for finding duplicate records in the TableA

select id, name, count(*) Count
from TableA
group by id, name 
having count(*) > 1
order by count(*) desc, id, name


Table contains following data

TableA
-------
ID      Name
--      --------
1       prasanna        
1       prasanna        
2       prasanna        
3       prasanna        
4       prasanna        
4       prasanna        
5       prasanna        

Output
------
ID      Name            Count
--      --------        ----
1       prasanna        2       
4       prasanna        2       


Hope this solves ur problem.

Thanks & Regards,
Prasanna K L [MCAD(CM) | MCSD.NET(Early Achiever)] [MS Community Star]


|Sr. Software Engineer�|First American Interactive Division|Office:+91 80�5115 6050  
Extn 4084 |Mobile:+91 98452 76356�|Fax:+91 80�841 1858 |[EMAIL PROTECTED] |
|Unit 1, Level 1, Explorer Building, International TechPark, Whitefield Road, 
Bangalore-560066|India| Website: www.firstam.com |

-----Original Message-----
From: BDOTNET [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, May 25, 2004 6:02 PM
To: BDOTNET
Subject: sql



New Message on BDOTNET


sql
Reply

�
Recommend 
Message 1 in Discussion 

From: hi4masrpreethi 

hi,
�
how to fine duplicate rows and�columns��from a table without using identity col.
�
thx,
preethi


View other groups in this category. 


Also on MSN:
Start Chatting�|�Listen to Music�|�House & Home�|�Try Online Dating�|�Daily Horoscopes 

Passport Member Services. 
For other questions or feedback, go to our Contact Us page. 

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list. 
Remove my e-mail address from BDOTNET. 



-----------------------------------------------------------

To stop getting this e-mail, or change how often it arrives, go to your E-mail 
Settings.
http://groups.msn.com/BDOTNET/_emailsettings.msnw

Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help

For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact

If you do not want to receive future e-mail from this MSN group, or if you received 
this message by mistake, please click the "Remove" link below. On the pre-addressed 
e-mail message that opens, simply click "Send". Your e-mail address will be deleted 
from this group's mailing list.
mailto:[EMAIL PROTECTED]

Reply via email to