On Fri, Feb 11, 2005 at 11:07:24 +0000, David Goodenough <david.goodenough@xxxxxxxxxxxxx> wrote: > > I thought of using an inner select for the join, and using limit 1 to > get just the one, and forcing the order by to give me the billing > address by preference, but I am then dependant on the sort order > of the particular type values I am selecting from. You can order by boolean expressions such as type = 'billing'. You can use that with LIMIT or DISTINCT ON to get just the address you want. ---------------------------(end of broadcast)--------------------------- TIP 4: Don't 'kill -9' the postmaster