Subject Re: [ib-support] Select SQL
Author Doug Chamberlin
At 10/30/2001 07:52 PM (Tuesday), Sandeep wrote:
>I have a table with field Number as primary key.
>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.

...and you want to know how to do this, right?

Try

SELECT * FROM TableA WHERE Number IN (SELECT MAX(Number) FROM TableA WHERE
Number < 1000)