consolidation of multiple rows

From: <canoe414_at_telecom-digest.zzn.com>
Date: Wed, 5 Mar 2008 08:19:17 -0800 (PST)
Message-ID: <4f04fa64-b865-4bf1-a7ed-498872b6bd74@u10g2000prn.googlegroups.com>


Greetings all,

I've got a table raw_Companies
--nname
--address
--phone
--fax
--email
--homepage

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----\N----sales_at_ibm.com---- www.ibm.com
IBM----\N----212-745-9324----212-745-0158----\N----\N in raw_Companies to

IBM----1234 Main
Street,Rochester,NY----212-745-9324----212-745-0158---- sales_at_ibm.com----www.ibm.com

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