Subject | Re: [ib-support] Select SQL |
---|---|
Author | Doug Chamberlin |
Post date | 2001-10-31T01:20:02Z |
At 10/30/2001 07:52 PM (Tuesday), Sandeep wrote:
Try
SELECT * FROM TableA WHERE Number IN (SELECT MAX(Number) FROM TableA WHERE
Number < 1000)
>I have a table with field Number as primary key....and you want to know how to do this, right?
>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.
Try
SELECT * FROM TableA WHERE Number IN (SELECT MAX(Number) FROM TableA WHERE
Number < 1000)