Re: query for displaying non distinct entries



Hi,

Select Email,count(*) as cnt from <tablename>
group by email
having count(*) >1


Thanks
Hari
SQL Server MVP

"gopi srinivas" <hellogopi2004@xxxxxxxxx> wrote in message
news:uABi1Pa0GHA.4392@xxxxxxxxxxxxxxxxxxxxxxx


hi all,

i want a sql stmt for displaying the total records in a table having the
multiple copies of a particular field say email .

so i want to display those records having same email in more than one
entries.

*** Sent via Developersdex http://www.developersdex.com ***


.



Relevant Pages

  • query for displaying non distinct entries
    ... i want a sql stmt for displaying the total records in a table having the ... multiple copies of a particular field say email. ...
    (microsoft.public.sqlserver.mseq)
  • Re: query for displaying non distinct entries
    ... Another solution, if the table has a primary key column, that would let you see the full rows is ... i want a sql stmt for displaying the total records in a table having the ...
    (microsoft.public.sqlserver.mseq)
  • Re: Percent of total records query
    ... SQL Server MVP ... "bobl" wrote in message ... > Need to calculate the percentage of total records that have a certain ... > 50 records have this field set to a certain value ...
    (microsoft.public.sqlserver.programming)