Skip site navigation (1) Skip section navigation (2)

Unable to identify an ordering operator

From: Ferruccio Zamuner <nonsolosoft(at)diff(dot)org>
To: pgsql-sql(at)postgresql(dot)org
Subject: Unable to identify an ordering operator
Date: 2000-12-31 14:55:12
Message-ID: 200012311455.eBVEtCt11654@tnt.diff.org (view raw or flat)
Thread:
Lists: pgsql-sql
Hello,

select persons.name,firm.name,persons.tel
       from persons,work,firm 
       where (persons.table_owner=0) and 
             (work.id_firm=firm.id and work.id_person=persons.id) 
          union
   select persons.name,firm.name,persons.tel 
          from persons,work,firm 
          where (persons.table_owner=1) and 
                (work.id_firm=firm.id and work.id_person=persons.id);

ERROR:  Unable to identify an ordering operator '<' for type '_text'
        Use an explicit ordering operator or modify the query


I know that this query can be rewrite to eliminate the UNION using an
OR operator on first condition but my question is:

How can I specify an ordering operator? On which field have I to put it?


Best wishes for the new YEAR,              \fer

Responses

pgsql-sql by date

Next:From: Tom LaneDate: 2000-12-31 17:17:19
Subject: Re: Unable to identify an ordering operator
Previous:From: Peter EisentrautDate: 2000-12-31 12:18:30
Subject: Re: Rules

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group