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

New Message on BDOTNET

-----------------------------------------------------------
From: Ritesh_Kesharwani
Message 2 in Discussion

hi Neeraj

    Here i am giving you one example you can go through you will get the
answer.

select au_lname, au_fname, city, state, count(*)
from dup_authors
group by au_lname, au_fname, city, state
having count(*) > 1
order by count(*) desc, au_lname, au_fname

The easiest way I know of to identify duplicates is to do a GROUP BY on all
the columns in the table. It can get a little cumbersome if you have a large
table. My duplicates look something like this: 

au_lname        au_fname   city                 state             
--------------- ---------- -------------------- ----- ----------- 
Smith           Meander    Lawrence             KS    3
Bennet          Abraham    Berkeley             CA    2
Carson          Cheryl     Berkeley             CA    2
except there are thirteen additional duplicates identified. 


Ritesh Kesharwani
SQL Star Intlernational Ltd.
[EMAIL PROTECTED]
[EMAIL PROTECTED]
www.Riteshk.blogspot.com
Cell - 9849976150



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

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