Skip to Content.
Sympa Menu

freetds - Re: Implementation of select Limit

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Rui Ribeiro" <ruirib AT computer.org>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Implementation of select Limit
  • Date: Sat, 10 Nov 2001 14:54:06 -0000


Hi,

I know this I'm about to say won't help much, but it seems to me that the
mechanism being searched
by the original posteris something provided by Active Data Objects (ADO). In
ADO you can specificy
the dimension of a page of records and then you can ask for a specific page
within the recordset
returned by the original query. I am not aware of the cost of this mechanism
on the server, because
its obvious that at some point the required work (finding the total number of
records, finding and
retrieving the records for the selected page) will have to be done. But it
sure eases the life of
the programmer.
Unfortunately in Unix or Linux the only way you could use this would be
through an ASP plataform
such as Chili!ASP or something similar.

It sure would be nice to have this in freetds, but it would be quite a move
from the current
philosophy.

Regards

Rui Ribeiro

> -----Original Message-----
> From: bounce-freetds-130046 AT franklin.oit.unc.edu
> [mailto:bounce-freetds-130046 AT franklin.oit.unc.edu]On Behalf Of Brian
> Bruns
> Sent: sexta-feira, 9 de Novembro de 2001 17:43
> To: TDS Development Group
> Subject: [freetds] Re: Implementation of select Limit
>
>
> Well typically the you start at the top at some point, so you can say
>
> select top 100 * from table where keycol > 'last value of key column from
> previous page'
>
> of course that blows up if you sort it on a non unique column.
>
> Brian
>
> > --IiVenqGWf+H9Y6IX
> > Content-Type: text/plain; charset=us-ascii
> > Content-Disposition: inline
> > Content-Transfer-Encoding: quoted-printable
> >
> > On Fri, Nov 09, 2001 at 07:32:06AM -0500, Brian Bruns wrote:
> > >=20
> > > Doesn't SQL Server have a limit-type statement? Sybase doesn't but
> > > I'm=20
> > > pretty sure MS added one....back, back, back into the recesses of my
> > > mind=
> > ,=20
> > > I think its like:
> >
> > > select top 100 * from table
> >
> > You can select records from the top, yes -- I've always been annoyed at
> > this deficiency of MS SQL, because usually when I want to limit the
> > results returned, it's because I'm running the query from a web script
> > that returns x number of results /at a time/... which means after you
> > get the /first/ 100 records, logically you might want to look at the
> > /second/ set of 100 records, and MS SQL doesn't provide a sensible
> > interface to this that I've seen.
> >
> > Steve Langasek
> > postmodern programmer
> >
> > --IiVenqGWf+H9Y6IX
> > Content-Type: application/pgp-signature
> > Content-Disposition: inline
> >
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.0.6 (GNU/Linux)
> >
> > iD8DBQE76/OGKN6ufymYLloRAuWRAJ4qzVIG9ETIvd++bQ7Z2pR4tvtWTwCfYk5T
> > ncmAcjIZU8q/Hmd4XFCdviY=
> > =KDLH
> > -----END PGP SIGNATURE-----
> >
> > --IiVenqGWf+H9Y6IX--
>
> ---
> You are currently subscribed to freetds as: [ruirib AT computer.org]
> To unsubscribe, forward this message to $subst('Email.Unsub')
>





Archive powered by MHonArc 2.6.24.

Top of Page