Re: Finding non-duplicate records?

From: Vishal Parkar (REMOVE_THIS_vgparkar_at_yahoo.co.in)
Date: 06/16/04

  • Next message: Billz89: "Re: Finding non-duplicate records?"
    Date: Wed, 16 Jun 2004 15:47:40 +0530
    
    

    hi bill,

    >>now I just need to pull the non-duplicate e-mails from the contest table<<

    If i understand your requirement correctly, you can write a query as shown
    in following example. Pls post the ddl, some sample records and expected
    result set to explain your problem.

    --sample data
    create table contest(pkid int identity (1,1), email varchar(50))

    insert into contest (email) values('vgparkar@yahoo.co.in')
    insert into contest (email) values('vgparkar@yahoo.co.in')
    insert into contest (email) values('vgparkar@hotmail.com')
    insert into contest (email) values('vparkar@hotmail.com')

    --query to get non duplicate email ids.

    select a.pkid,a.email
    from contest a join
    (select email from contest group by email having count(*) = 1) b
    on a.email = b.email

    -- 
    Vishal Parkar
    vgparkar@yahoo.co.in | vgparkar@hotmail.com
    

  • Next message: Billz89: "Re: Finding non-duplicate records?"

    Relevant Pages

    • Re: Calculating relative record numbers
      ... I simplified the query, indeed, as example, I removed any reference to ... condition on judge contest too, if there are more than a single contest. ... there is more than one judge by contest, ... of the in the subquery. ...
      (microsoft.public.access.queries)
    • Re: The word escapes me
      ... that you are vehemently trying to make a contest out of my sincere query. ... Did I change your request for help on your essay into a challenge to see who could offer the most sarcastic and disadvantageous reply? ...
      (alt.usage.english)
    • Re: No longer a nearly-newbie
      ... I notice that the reply to my query is a long time coming. ... You v a nice hot bath and Big Brother? ... No contest. ...
      (uk.education.staffroom)