Subject | RE: [firebird-support] order by subselected value |
---|---|
Author | Alan McDonald |
Post date | 2005-01-06T11:01:59Z |
> Hi to all,use the column number instead
>
> I have got a little problem with this query:
> SELECT
> n.*, (n.datefinish-CURRENT_TIMESTAMP)*{DAY} rest, n.article,
> n.idealprice, c.name,
> (SELECT COUNT(*) FROM offers o WHERE o.nbid=n.id) offers
> FROM need 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;
>
> and getting Dynamic SQL Error SQL error code = -206 Column unknown OFFERS.
> Is it possible to %subj%?
>
> thanx
> Michal
Alan