Subject | order by subselected value |
---|---|
Author | Michal Žeravík |
Post date | 2005-01-06T10:35:03Z |
Hi to all,
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
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