<!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 & 1) <> 0
and</font></div>
<div><font color="#000000">((events.expires = 't' and events.v_date >
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>