Query

From: Alexander Lohse <al(at)humantouch(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Query
Date: 2001-05-16 07:34:16
Message-ID: p05100300b727dd314d05@[192.168.0.89]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

<!doctype html public "-//W3C//DTD W3 HTML//EN">
<html><head><style type="text/css"><!--
blockquote, dl, ul, ol, li { padding-top: 0 ; padding-bottom: 0 }
--></style><title>Query</title></head><body>
<div><font color="#000000">Hi,</font></div>
<div><font color="#000000"><br></font></div>
<div><font color="#000000">can anyone explain me why this is
happening?</font></div>
<div><font color="#000000">In oppinion I have events.v_date in the
result!</font></div>
<div><font color="#000000"><br></font></div>
<div><font color="#000000">___________________</font></div>
<div><font color="#000000">select distinct
events.id,events.v_date</font></div>
<div><font color="#000000">from events</font></div>
<div><font color="#000000">where</font></div>
<div><font color="#000000">(events.aid &amp; 1) &lt;&gt; 0
and</font></div>
<div><font color="#000000">((events.expires = 't' and events.v_date &gt;
989994114) or (events.expires = 'f'))</font></div>
<div><font color="#000000"><br></font></div>
<div><font color="#000000">INTERSECT</font></div>
<div><font color="#000000"><br></font></div>
<div><font color="#000000">select distinct
events.id,events.v_date</font></div>
<div><font color="#000000">from events,event_ref</font></div>
<div><font color="#000000">where 1=1 and (events.id =
event_ref.event_id and event_ref.ref_id =
'team_3af2a2ba2f93a')</font></div>
<div><font color="#000000"><br></font></div>
<div><font color="#000000">order by events.v_date</font></div>
<div><font color="#000000">___________________</font></div>
<div>returns:</div>
<div><br></div>
<div><font color="#000000"><b>ERROR: ORDER BY on a
UNION/INTERSECT/EXCEPT result must be on one of the result
columns</b></font></div>
<div><font color="#000000"><b><br></b></font></div>
<div><font color="#000000">Thank you in advance,</font></div>
<div><font color="#000000"><br></font></div>
<div><font color="#000000">Alex</font></div>
<div><font color="#000000"><b><br></b></font></div>
<div><br></div>
<x-sigsep><pre>--
</pre></x-sigsep>
<div>___________________________<br>
Human Touch Medienproduktion GmbH<br>
Am See 1<br>
17440 Klein Jasedow<br>
<br>
Alexander Lohse<br>
Tel: (038374) 75211<br>
Fax: (038374) 75223<br>
eMail: al(at)humantouch(dot)de<br>
http://www.humantouch.de</div>
</body>
</html>

Attachment Content-Type Size
unknown_filename text/html 2.2 KB

Browse pgsql-general by date

  From Date Subject
Next Message Trygve Falch 2001-05-16 07:58:27 Queries across multiple databases (was: SELECT from a table in another database).
Previous Message Tony Grant 2001-05-16 07:09:37 Re: Re: Which Front End for Postgresql