[PLUG] OT: Databases

Paul Heinlein heinlein at attbi.com
Thu Sep 19 13:42:39 UTC 2002


On Wed, 18 Sep 2002, Jeremy Bowen wrote:

> This is probably more of a datatbase question than a Linux question.

Is it? Do you lists reside in a database, or are they in text files?

> I need someone who can show me how to do the following (consultant
> or just someone good with databases and programs):
> 
> List A (45,000 records) has: Name, Address, City, State, Zip
> 
> List B (100,000) has: Name, Address, City, State, Zip, Additional
> Data, Additional Data.......

If they're in an SQL-addressable database, and you're sure that List B 
records are identical to List A records except for the additional 
data, then

  select
    a.name, a.address, a.city, a.state, a.zip
  from
    a,b
  where
    a. name   = b.name    and
    a.address = b.address and
    a.city    = b.city    and
    a.state   = b.state   and
    a.zip     = b.zip

If the data in the fields that exist in A and B aren't *identical*,
however, then you'll have some trouble...

--Paul Heinlein <heinlein at attbi.com>





More information about the PLUG mailing list