Re: Getting the First Row
Posted in 1998
Herb Blacker wrote: > > I'm running version 5.08 on a RS/6000 (AIX). What my users need to do > is to select a number of rows (2000-3000) using a normal select, then select > the *first* row returned. This is to keep the network traffic down by > having the server do all the work, and then return only the first selected > row to the client. Is there an easy way to do this...or do I have to select > into a temp table and then pick the first row out of it? > And yes, I know that 7.30 has this feature...we'll be upgrading in the future. > TIA, > ----------------------------------------------- > Herb Blacker > Cimarron, Inc. > Sr. Database Administrator > Dept. of Labor Job Corps, San Marcos, Texas > ----------------------------------------------- Hi Herb, save the primary key of the first row into a variable and read the single row again. Maybe the answer is incomplete, but I do not really know what you are looking for ?!? First select 2000 rows ? What the hell are you doing with the result set ? Why do you select 2000 rows if you only need the first one ? Are your users first selecting 2000 rows at the server site and go then to their PC and pick the first row up ? How can you reduce the network traffic when you selected the 2000 rows already ? ( ... more questions than answers ... ) Bye Stefan Weideneder