SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Fuzzy Lookup - Duplicate Removal using SQL Query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Kalaiselvan
Posting Yak Master

India
109 Posts

Posted - 10/25/2013 :  14:17:54  Show Profile  Reply with Quote
Hi,
Using Fuzzy Lookup I have got a Destination Table with some Duplicate Rows of NAme and Address and with its Reference.
Need to get a Unique Data from the Table using SQL Query.

FuzzyLook up Table:
[NAME] [ADDRES] [REF_NAME] [REF_ADDRES] [CITY] [PINCODE]
AJAY 81,1st St RAHUL NO:81, 1st st CHENNAI 600116
AJAY 81,1st St MAHESH NO:81,1st street CHENNAI 600116
RAHUL NO:81, 1st st AJAY 81,1st St CHENNAI 600116
RAHUL NO:81, 1st st MAHESH NO:81,1st street CHENNAI 600116
MAHESH NO:81,1st street AJAY 81,1st St CHENNAI 600116
MAHESH NO:81,1st street RAHUL NO:81, 1st st CHENNAI 600116
ARUN 45, PADI JAMES PADI,2nd St CHENNAI 600052
JAMES PADI,2nd St ARUN 45, PADI CHENNAI 600052
Output:
[NAME] [ADDRESS] [REF_NAME] [CITY] [PINCODE]
AJAY 81,1st St RAHUL,MAHESH CHENNAI 600116
ARUN 45, PADI JAMES CHENNAI 600052

Need the Output from Top Table Unique Name Over REF_Name and Ref_Name will be Comma Separated for NAme COlumn.
The Above Output Matches the Actual Table. Please help me to fix this Using SQL Query.. Its just a Sample Data, Need this for Millions of Records. So using Query will be useful to me...


Regards,
Kalai

sqlps
Starting Member

India
8 Posts

Posted - 10/26/2013 :  22:51:12  Show Profile  Reply with Quote
hi kalai,

PLease post your expected result also
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.14 seconds. Powered By: Snitz Forums 2000