Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Merging records with the same company name

Status
Not open for further replies.

fcoomermd

Programmer
Nov 20, 2002
218
CA
This is what I am having troubles with.
If I have a table like this:
Source -- CompanyName--Address---------City
Joe Ford 1185 Jones St Null
Bill Ford Null Arizona
Joe Samsung Null Chicago
Bill Samsung 185 Toledo StLouis

This what I need to do, merge the records where the company is the same, filling in all the null fields. And when both records have a value for a field, the record that has a Joe Source take priority...
So far, I have seperated these into two tables... One with the Source=Joe, and another with Source=Bill.

So, in the end... the output would be
Source -- CompanyName--Address---------City
Joe Ford 1185 Jones St Arizona
Joe Samsung 185 Toledo Chicago

Thanks alot
Fred
 
Hi Fred..

I think you can do it with the processing of record one by one from two tables. You can use @@FETCH_STATUS.

Thank's
Kurniadi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top