Cowboy
1/11/2008 4:30:00 AM
"Jonathan Wood" <jwood@softcircuits.com> wrote in message
news:O6Yw7JATIHA.5980@TK2MSFTNGP04.phx.gbl...
> Cowboy,
>
>> No, but you can use TOP.
>>
>> For example, to get the following:
>>
>> SELECT column FROM table
>> LIMIT 10
>>
>> You would use
>>
>> SELECT TOP 10 column FROM table
>
> That implements paging as long as the user only wants to see the first
> page. ;-)
Sure, but you can offset the data by using a WHERE clause. Yes, it is much
more involved.
SELECT TOP n * FROM Table
WHERE id > x
or
SELECT TOP n * FROM Table
WHERE id < x
As you move up and down in pages, you can build it up each direction. You
can even adopt this when going up many pages by using a temp table or
similar.
Not sure why MS did not include this.
--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA
*************************************************
| Think outside the box!
|
*************************************************