Subject | Re: [ib-support] Select SQL |
---|---|
Author | Paul Schmidt |
Post date | 2001-10-31T18:03:32Z |
On 31 Oct 2001, at 13:52, Sandeep wrote:
SELECT * FROM tableA WHERE Number < 1000 ORDER BY
Number DESC;
The first record you fetch is the one you want, if you want records
before that, then simply keep fetching.
Paul
Paul Schmidt
Tricat Technologies
paul@...
www.tricattechnologies.com
> I have a table with field Number as primary key.I have seen a couple of ways, here is the easiest,
> I want to get a record prior to specified number, something like
>
> select * from tableA
> where Number < 1000
>
> I don't know what the previous number is.
>
SELECT * FROM tableA WHERE Number < 1000 ORDER BY
Number DESC;
The first record you fetch is the one you want, if you want records
before that, then simply keep fetching.
Paul
Paul Schmidt
Tricat Technologies
paul@...
www.tricattechnologies.com