consolidation of multiple rows

From: <>
Date: Wed, 5 Mar 2008 08:19:17 -0800 (PST)
Message-ID: <>

Greetings all,

I've got a table raw_Companies

with no keys defined
and a table Companies
with the same structure but with nname declared as a primary key.

Once raw_Companies gets loaded up I see where there are multiple rows with the same value for nname but missing data in the other fields. One row may have an address and phone while another will have only an email, while a third may have an address and a homepage.

I need a way to take the rows in raw_Companies with the same nname and consolidate them into one composite row inserted into Companies.

So from

IBM----1234 Main Street,Rochester,NY----\N----\
IBM----\N----212-745-9324----212-745-0158----\N----\N in raw_Companies to

IBM----1234 Main

in Companies

Any help/hints/suggestions/code would be greatly appreciated.

TIA, Still-learning Steve Received on Wed Mar 05 2008 - 10:19:17 CST

Original text of this message