Subject | "token unknown 'order' " |
---|---|
Author | Duilio Foschi |
Post date | 2002-04-28T09:10:31Z |
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
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