Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Fuzzy Lookup - Duplicate Removal using SQL Query

Author  Topic 

Kalaiselvan
Posting Yak Master

112 Posts

Posted - 2013-10-25 : 14:17:54
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

8 Posts

Posted - 2013-10-26 : 22:51:12
hi kalai,

PLease post your expected result also
Go to Top of Page
   

- Advertisement -