Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all articles
Browse latest Browse all 13329

Need Help

$
0
0
Hello everyone,

I am grateful for this forum and specially for user of BD on this forum for their support in the past.

I have duplicate records as show below with the following fields:

ID,firstname,lastname,address,city,province,postal code

123, John,Smith, 123 Main Street,Toronto,ON,M1S1S
435, John,Smith, 123 Main Street,Toronto,ON,M1S1S
657,John,Smith, 123 Main Street,Toronto,ON,M1S1S

I would like to write script to compare first name, lastname, city, province and postal and if they are the same, then replace the ID and the result should look like below:

123, John,Smith, 123 Main Street,Toronto,ON,M1S1S
123, John,Smith, 123 Main Street,Toronto,ON,M1S1S
123,John,Smith, 123 Main Street,Toronto,ON,M1S1S

Any help on how to accomplish the above is greatly appreciated.

Thanks!

Viewing all articles
Browse latest Browse all 13329

Trending Articles