Mike Benoit wrote: > That helps some, but I'm sure it could be even more clear. > > The main issue is that you can't order by an expression computed by > unions, correct? So couldn't the error message by something like: > > "ORDER BY on a UNION/INTERSECT/EXCEPT result must match existing result > columns and not be an expression"))); Well, it can be an expression _if_ the expression _matches_ an existing UNION column. -- Bruce Momjian bruce@xxxxxxxxxx EnterpriseDB http://www.enterprisedb.com + If your life is a hard drive, Christ can be your backup. +