postgresql7.1 select acs_object__name(:object_id) select p.party_id, acs_object__name(p.party_id)|| coalesce(' ('||p.email||')', '') as name from parties p order by upper(acs_object__name(p.party_id))