Article View: microsoft.public.vb.database
Article #5Re: Limiting SELECT output from line X to line Y ??
From: Hemol
Date: Wed, 18 Oct 2000 00:00
Date: Wed, 18 Oct 2000 00:00
34 lines
2386 bytes
2386 bytes
You could use cursors to accomplish this. Write a nice stored procedure, and pass in params for the row range you want. Then it's just a simple T-SQL loop to pull the rows you're looking for. If you keep the cursor open (e.g., do not close the db connection), and make the cursor scrollable, if shouldn't be too inefficient. Just as an aside, it might be more efficient to manage the data directly on the web server. "Ernest 'OERNii' Beinrohr" <oernii@oernii.sk> wrote in message news:39E82003.E697B472@oernii.sk... > 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 | : : : : :: :: : : : :: : : :
Technical Details
Message-ID:
<SljH5.60663$tn.1238918@typhoon.ne.mediaone.net>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: 103747,27940dede5576130 X-Google-Attributes: gid103747,public X-Google-Thread: 104de1,27940dede5576130 X-Google-Attributes: gid104de1,public X-Google-Thread: ff490,27940dede5576130 X-Google-Attributes: gidff490,public X-Google-Thread: 10be7f,27940dede5576130 X-Google-Attributes: gid10be7f,public From: "Hemol" <mackeys@mediaone.net> Subject: Re: Limiting SELECT output from line X to line Y ?? Date: 2000/10/18 Message-ID: <SljH5.60663$tn.1238918@typhoon.ne.mediaone.net> X-Deja-AN: 682928761 References: <39E82003.E697B472@oernii.sk> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Complaints-To: abuse@mediaone.net X-Trace: typhoon.ne.mediaone.net 971882994 24.91.227.247 (Wed, 18 Oct 2000 11:29:54 EDT) Organization: Road Runner X-MSMail-Priority: Normal NNTP-Posting-Date: Wed, 18 Oct 2000 11:29:54 EDT Newsgroups: microsoft.public.vb.database,comp.databases.ms-sqlserver,microsoft.public.vc.database,cz.comp.microsoft.sql