How about something like: create table peopleandphones....
insert <fields> into peopleandphones from people.id, people.name... where people.id = phone.id; Or, more generally: insert <fieldlist> into <new-table> from <table-qualified-fieldlist> where <condition> The create for "new-table" could be implicit even. David LeBlanc Seattle, WA USA > -----Original Message----- > From: D. Richard Hipp [mailto:[EMAIL PROTECTED] > Sent: Monday, December 22, 2003 13:27 > To: [EMAIL PROTECTED] > Subject: Re: [sqlite] How do I coalesce values in a join? > > > Scott Lamb wrote: > > Ron Aaron wrote: > > > >> I have two tables: > >> people (id,first,last) > >> > >> and phones (id, type, phone) > > > > > > ... > > > >> 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! > > > > > > Raw SQL doesn't really do that well. > > Can anybody suggest some kind of extended SQL syntax that > could be added to SQLite that would make this kind of thing > easier? > > -- > D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565 > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]