SQL statement help needed (2)

  • Hi folks, I had such good luck finding the answer to my last problem here! I thought I would try my luck again.

    I run a babysitter referral service for parents in the US and Canada and following is the problem I am having.

    A database table which stores the information for my parents members has some duplicates. The reasons why is sometimes they submit the form and possibly the welcome new member page doesn't appear. So they sign up again for the second time.

    I need a sql statement which will find the duplicates based on first name - last name - eMail address. 

    The table is called tbParents and I need to have the following columns displayed in the recordset (results).

    pUserID - which is the parent user ID number

    pFirstName - Parent first name

    pLastName - parent last name

    pEmailAdd - parent email address

    pLoginCount - has many times the parent has logged in

    pZipCode - parent zip code

    pJoinDate - date parent joined.

    I don't even know where to start except

    SELECT pUserID, pFirstName, pLastName, pEmailAdd, pLoginCount, pZipCode, pJoinDate

    FROM tbParents

    Thanks in advance for any help you can provide,

    Rob

     

     

     

     

    Phone a Babysitter.com
    Connecting Parents and Babysitters Nationwide!

  • Discover the script section here. There are several scripts for finding duplicates.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Boy Frank, you germans are so demanding

    I took your advice - found what I  needed - it worked great!

    Cheers to all

    Phone a Babysitter.com
    Connecting Parents and Babysitters Nationwide!

  • No, not me! But I know a friend who knows someone who has heard, that there might be some people...

    Actually I only thought about why always reinvent the wheel when someone else has done similar before.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • I hear you! The worst part of running a website is having to repeat the same information over and over again to your customers.

    Take Care

    Phone a Babysitter.com
    Connecting Parents and Babysitters Nationwide!

  • A question about finding duplicates turns into a thread about not having duplicated (rehashed) posts

    Anyway, I would be nice if when someone, like Ud4 in this case, finds what their looking for, to go ahead and paste the link to what they've found into the thread, since someone might "search" and find this thread, have to do all the searching work Ud4 had to do again.

     



    Once you understand the BITs, all the pieces come together

  • I agree, Thomas!

    ...and besides another two points , feedback from the original questioner should always be there as to whether the problem is solved or not

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • Ah but Frank - I did provide feedback that my problem was solved  in a earlier post!

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

    I took your advice - found what I  needed - it worked great!

    Cheers to all

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

    But Thomas is right! I truly lacked posting etiquette which i do not want to see duplicated again? so here it is:

    http://www.sqlservercentral.com/scripts/contributions/350.asp

    Phone a Babysitter.com
    Connecting Parents and Babysitters Nationwide!

  • Sorry Rob, I didn't mean you, but rather put it in here as a general remark. I admit my remark was ambiguous.

    --
    Frank Kalis
    Microsoft SQL Server MVP
    Webmaster: http://www.insidesql.org/blogs
    My blog: http://www.insidesql.org/blogs/frankkalis/[/url]

  • I just like posting into threads with Frank .

    I did not mean Rob specifically either, at least Rob posted that "a solution was found"... that's at least half the battle. I'm just selfishly thinking of my lazy self more than I am of posting etiquette, so that when I forget how to do SQL things (happens more often all the time ), I can just lazily "search", and get an answer quickly . What I hate the most, is tracking down a thread thinking (hoping) there's a solution at the end, only to run into a "dead end" after hours of wasting time.

    Now I only need to search for "Rob Duplicate Frank"

    Thanks Rob.



    Once you understand the BITs, all the pieces come together

  • Hey Frank, not a problem. Thanks for the help and I look forward to your input the next time i'm stuck.

    Take Care,

    Rob

    Phone a Babysitter.com
    Connecting Parents and Babysitters Nationwide!

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply