Subject | Re: [ib-support] Select SQL |
---|---|
Author | Sandeep |
Post date | 2001-10-31T02:05:56Z |
On 30 Oct 2001, at 20:20, Doug Chamberlin wrote:
Sandeep
Software Developer
CFL
sandeep@...
http://www.cfl.co.nz
> At 10/30/2001 07:52 PM (Tuesday), Sandeep wrote:thanx
> >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)
Sandeep
Software Developer
CFL
sandeep@...
http://www.cfl.co.nz