Subject Re: [firebird-support] order by subselected value
Author Michal Žeravík
Sorry, can't understand.
what is column number?
As I said :

SELECT
n.*, (n.datefinish-CURRENT_TIMESTAMP)*86400 rest, n.article,
n.idealprice, c.name,
(SELECT COUNT(*) FROM offers o WHERE o.nbid=n.id) offers
FROM needbox n, category c
WHERE
c.id=n.catid AND c.isactive=1 AND n.userid=? AND
CURRENT_TIMESTAMP>=n.datestart
AND CURRENT_TIMESTAMP<=n.datefinish
ORDER BY offers;
Statement failed, SQLCODE = -206

Dynamic SQL Error
-SQL error code = -206
-Column unknown
-OFFERS
-At line 10, column 10.


What is wrong?
michal


Nick Upson wrote:

>Order by <column number>
>
>
>