Hi all -

This may be a boneheaded question, but I cannot figure out how to
accomplish what I want.

I have two tables:  

people (id,first,last)

and phones (id, type, phone)

Where each person in the 'people' table might have up to four phones.


I can easily get a report of phones by joining the people and phones:

select p.first,p.last,ph.phone
from people as p, phones as ph
where p.id = ph.id;


The problem is that this produced one line per person/phone combination.


What I would like to do, is 'coalesce' the phones to produce another
table:

peopleandphones (id,first,last,home,cel,work,fax)

So I could make a much nicer report.  But I cannot figure out how to do
this!

Help, anyone?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to