Subject RE: [ib-support] "token unknown 'order' "
Author Reggie White
I think FB or the SQL standards has an issue with an "order by" in a
subselect.

There was a thread here about it.

-----Original Message-----
From: Duilio Foschi [mailto:dedalus@...]
Sent: Sunday, April 28, 2002 2:11 AM
To: ib-support@yahoogroups.com
Subject: [ib-support] "token unknown 'order' "


I want to add (the field qty of all) the most recent records.

d_mov is the field that contains the date.

What I am trying to say is "sum field qty in table mv_li where the date has
the most recent value

select sum(a.qty) from mv_li a
where a.d_mov=(select first 1 b.d_mov from mv_li b
order by b.d_mov desc)

If I were Firebird, I would understand at once what to compute :)

What's wrong with FB ?

TIA

Duilio Foschi



To unsubscribe from this group, send an email to:
ib-support-unsubscribe@egroups.com



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/