Friday, March 9, 2012

How to return a set of Data ?

Hello,
I have to make queries on a very big database, bon only part by part.
For example : I would like to use a SELECT request and get only the rows
1000 to 1999.
With the TOP keywork, I can get the 10 first rows. But what is the command
to retrieve the rows between tho numbers ?I would use a generated IDENTITY column in the result set, and then filter
on the IDENTITY value.
Martin
"Florent CORNEILLE" <FlorentCORNEILLE@.discussions.microsoft.com> wrote in
message news:DE105ECC-7FD0-44FA-97C8-AB495BBC7601@.microsoft.com...
> Hello,
> I have to make queries on a very big database, bon only part by part.
> For example : I would like to use a SELECT request and get only the rows
> 1000 to 1999.
> With the TOP keywork, I can get the 10 first rows. But what is the command
> to retrieve the rows between tho numbers ?
>|||-- Try:
SELECT *
FROM <@.your_table, SYSNAME, >
WHERE <@.your_field, SYSNAME, > Between 1000 And 1999
-- This query is formatted as a template, so from Query Analyser, press
Ctrl+Shift+M and fill in the parameters.
-- Lookup "Using Templates in SQL Query Analyzer" in BOL
-- Damien
"Florent CORNEILLE" wrote:

> Hello,
> I have to make queries on a very big database, bon only part by part.
> For example : I would like to use a SELECT request and get only the rows
> 1000 to 1999.
> With the TOP keywork, I can get the 10 first rows. But what is the command
> to retrieve the rows between tho numbers ?
>

No comments:

Post a Comment