On 05/15/2009 03:41, Dennis Cote wrote: > > Your database would be simpler if you simply combined these two tables > into a single table in the first place. It would eliminate the need to > combine them for this type of query. The tables already have a type > field to distinguish the email adresses from the phone numbers, so there > is no need to put them in separate tables. > Thanks to Dennis, John and Patty for your answers. I had the feeling this was not difficult, but up to now I've managed to avoid learning about SQL unions.
This isn't my database, so I live with what's there. In fact, P and E aren't even tables. They're subqueries, and this solution is going to be part of a larger query that extracts data from one (complex and large) DB2 database and puts it into another, simpler one in SQLite. Both source and target are already specified and the program design is such that the adaptation must be done completely in the query. Thanks again. -evan _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users