[freetds] absolute fetches

Frediano Ziglio freddyz77 at tin.it
Tue Apr 8 03:40:20 EDT 2003


Il lun, 2003-04-07 alle 23:09, Jon Pounder ha scritto:
> Ok, is there any other way then to quickly run through the first n records 
> and throw away the results ?
> 
> eg: I want rows 100 to 110, from looking at the code now, I gather than to 
> implement this, rows 1 to 99 are actually all transferred from the db 
> server to the driver and then thrown away, is there any facility for doing 
> a fetch_next without actually transferring the data ?
> 
> 

Well, you can change database system.. I'm kidding :)

Use temporary table and language cursors, use rowcount (or top modifier)

select top 110 * into #res1 from mytable where..

Then skip 100 record and return
I suggest to add a numeric_position column to temporary table and do a select...

freddy77




More information about the FreeTDS mailing list