Subject | Re: Select last - How to select latest data |
---|---|
Author | menjit_singh |
Post date | 2005-12-08T14:24:45Z |
--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@s...> wrote:
<Ivan.Prenosil@s...> wrote:
>DATA
> >> Method 1:
> >> 'SELECT Skip((SELECT COUNT(*) - 30 FROM DATA)) CLS, VOL, OPN,
> > HIGH, LOW, DATA,symbol FROM DATA
> >> WHERE STOCK='''+imya+''' order by DATA ACS'
> >>
> >>
> >> Method 2 (you need Firebird 2):
> >>
> >> 'SELECT * FROM (
> >> SELECT First 30 CLS, VOL, OPN, HIGH, LOW, DATA,symbol FROM
> >> WHERE STOCK=xxx ORDER BY DATA DESC )error
> >> ORDER BY DATA ASC
> >>
> >
> > i'm using fbembed.dll version 1.5.2.4731.i used method 1 but an
> > occured. Should i replace the '*' in the COUNT(*) with something?ASC.
>
> Which error ? I copy/pasted you typo ACS, should be ORDER BY DATA
> Do you really use two pairs or parenthesis ?the 'FROM(
> SELECT Skip ( ( SELECT ... ) ) ...
>
>
> > method 2 also produced an error, undefine token SELECT for
> > SELECT..'
>
> As I wrote, it is for FB2.0 only.
>
> Ivan
>