Subject | RE: [firebird-support] order by subselected value |
---|---|
Author | Alan McDonald |
Post date | 2005-01-06T11:34:30Z |
> Sorry, can't understand.we can't see how many columns you have because you are asking for all
> what is column number?
> As I said :
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
>
>
>
>
>
>
>
>
>