Subject RE: [firebird-support] order by subselected value
Author Alan McDonald
> Sorry, can't understand.
> what is column number?
> As I said :

we can't see how many columns you have because you are asking for all
columns in table n.
but tru ORDER BY 5
OR
ORDER BY 10
you'll see what it means
Alan

>
> 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>
> >
> >
> >
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>
>