Jump to content

urgent SQL help kavalenu


Recommended Posts

Posted

i need to find out duplicate members  based on their firstname, lastname, dob, zipcode. I need to write a query to list out the duplicates even if the first name, last name matches 70% but have the same dob and zip.

example, i have two records with first name PAVAN and PAWAN with same last name and dob (this is a duplicate), so i want to bring not only the exact match of the first last name, dob and zip but also if the first and last name matches 70% and both records have the same dob and zip. 

Record 1:

Firstname: PaVan, Lastname: Kalyan, DOB: 01/01/1985, Zip:00000

Record 2: 

Firstname: PaWan, Lastname: Kalyan, DOB: 01/01/1985, Zip:00000

pls help..

 

Posted
4 minutes ago, cnu_raop said:

i need to find out duplicate members  based on their firstname, lastname, dob, zipcode. I need to write a query to list out the duplicates even if the first name, last name matches 70% but have the same dob and zip.

example, i have two records with first name PAVAN and PAWAN with same last name and dob (this is a duplicate), so i want to bring not only the exact match of the first last name, dob and zip but also if the first and last name matches 70% and both records have the same dob and zip. 

Record 1:

Firstname: PaVan, Lastname: Kalyan, DOB: 01/01/1985, Zip:00000

Record 2: 

Firstname: PaWan, Lastname: Kalyan, DOB: 01/01/1985, Zip:00000

pls help..

 

@Balibabu

Posted

(

SELECT lname, fname FROM [Employee]  
WHERE lname != ' 'AND fname != ' '  
GROUP BY lname, fname  
HAVING COUNT(lname) > 1 and COUNT(fname) > 1)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...