Andre Schnabel a écrit : <blockquote type="CITE">Hello Richard, <p>I did some testing and after all your query should
beordered right. <br />The test's I have done: <p>Test=# select t.foo1 from testtable t <br />Test-# union <br />Test-#
selectt.foo2 from testtable t <br />Test-# order by t.foo1; <br />ERROR: Relation 't' does not exist <p>-------- Same
erroras you get ---- <p>Test=# select t.foo1 from testtable t <br />Test-# union <br />Test-# select t.foo2 from
testtablet <br />Test-# order by foo1; <br /> foo1 <br />------ <br /> abc <br /> cdef <br />(2 rows) <p>--------
OrderedAscending (maybe by chance?) --- <p>Test=# select t.foo1 from testtable t <br />Test-# union <br />Test-# select
t.foo2from testtable t <br />Test-# order by foo1 DESC; <br /> foo1 <br />------ <br /> cdef <br /> abc <br />(2 rows)
<p>----Ordered descending (ordering works!) --- <p>I guess, the table-alias is not known to the order-clause. Maybe the
<br/>execution (or parsing) order of the UNION changed from 7.0 to 7.1.</blockquote> Hello Andre, <p>Thanks very much
forhaving tested. Yes, it works well. <pre>--
Richard NAGY
Presenceweb</pre>