Article View: microsoft.public.vb.database
Article #4Re: Limiting SELECT output from line X to line Y ??
From: Thomas R. Hummel
Date: Mon, 16 Oct 2000 00:00
Date: Mon, 16 Oct 2000 00:00
55 lines
3085 bytes
3085 bytes
One possibility is to create a table on the server to hold the results.
This table should have columns for all of the columns that you want to
return as well as an incrementing column (NOT an identity column -
you'll need to get this value yourself since it needs to start at 1 for
each user and increment without skipping numbers), a datetime column
that defaults to the time that a record is added and a column (or
multiple columns if necessary) to identify the user or connection that
made the search request.
When a user makes a search request you insert the results into this
table and return them from there. You can use the incrementing column
to limit which records you are showing. You just need to make sure that
the table gets cleaned up every once in awhile as results "timeout".
This is something that I just came up with off the top of my head, so
there may be a much better way to do it. It seems like MTS would be
able to handle something like this, but I don't know what its
capabilities are. Maybe someone else has a better solution?
Good luck,
-Tom.
In article <39E82003.E697B472@oernii.sk>,
Ernest 'OERNii' Beinrohr <oernii@oernii.sk> wrote:
> Hi there, is there a possibility in MS SQL server 7 to limit the
output
> from a select query per LINES ?????? (not where)
> Like:
>
> select * from table limit 1000,1100
> (this should get me only the lines 1000 - 1100)
>
> I need this to make "pages" on my www search results.
>
> Thanx for help.
> PS: sorry for crossposting
> --
>
==========================----------------------------------------------
---
> OERNii - Ernest Beinrohr | @@@@@@ @@@@@@@@ @@@@@@@ @@@ @@@
@@@ @@@
> mailto:oernii@oernii.sk | @@! @@@ @@! @@! @@@ @@!@!@@@
@@@ @@@
> http://www.oernii.sk | !@! !!! !!!!!: !!@!@! !@! !!!
!!! !!!
> #holubnik on IRCNET | :!: !:! :!: :!: !:! :!: !:!
:!: :!:
> ICQ No : 28153343 | : : : : :: :: : : : :: :
: :
>
Sent via Deja.com http://www.deja.com/
Before you buy.
Technical Details
Message-ID:
<8sfcbl$ne7$1@nnrp1.deja.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<39E82003.E697B472@oernii.sk>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 104de1,27940dede5576130 X-Google-Attributes: gid104de1,public X-Google-Thread: 103747,27940dede5576130 X-Google-Attributes: gid103747,public X-Google-Thread: ff490,27940dede5576130 X-Google-Attributes: gidff490,public X-Google-Thread: 10be7f,27940dede5576130 X-Google-Attributes: gid10be7f,public From: Thomas R. Hummel <tom_hummel@my-deja.com> Subject: Re: Limiting SELECT output from line X to line Y ?? Date: 2000/10/16 Message-ID: <8sfcbl$ne7$1@nnrp1.deja.com> X-Deja-AN: 682121198 References: <39E82003.E697B472@oernii.sk> X-Http-Proxy: 1.0 x54.deja.com:80 (Squid/1.1.22) for client 207.29.197.4 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Mon Oct 16 17:02:52 2000 GMT X-MyDeja-Info: XMYDJUIDtom_hummel Newsgroups: microsoft.public.vb.database,comp.databases.ms-sqlserver,microsoft.public.vc.database,cz.comp.microsoft.sql X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 4.01; Windows NT)