Re: Records in front of and behind another record

2006-06-26 Thread Scott Haneda
> OK, that's clear. Sorry about the bervity, ill clear this up below. > Scott Haneda wrote: >> I am thinking UNION and two SQL queries would do this, how is UNION >> optimized, is it more or less the same as running two selects? > > Usually, but a UNION of what two queries? I won't comment on t

Re: Records in front of and behind another record

2006-06-26 Thread Michael Stassen
Scott Haneda wrote: > Mysql 4 > > I have a frustrating case here, a list of numbers, say, 0 through 30,000 or > so, however, there are gaps in the numbers, so not purely sequential. > > I am faced with selecting one record from the dataset, that's simple, > however, before that select, I need to m

Re: Records in front of and behind another record

2006-06-26 Thread Scott Haneda
>> Mysql 4 >> >> I have a frustrating case here, a list of numbers, say, 0 through 30,000 or >> so, however, there are gaps in the numbers, so not purely sequential. >> >> I am faced with selecting one record from the dataset, that's simple, >> however, before that select, I need to make sure the

Re: Records in front of and behind another record

2006-06-26 Thread Scott Haneda
> Mysql 4 > > I have a frustrating case here, a list of numbers, say, 0 through 30,000 or > so, however, there are gaps in the numbers, so not purely sequential. > > I am faced with selecting one record from the dataset, that's simple, > however, before that select, I need to make sure the record

Records in front of and behind another record

2006-06-26 Thread Scott Haneda
Mysql 4 I have a frustrating case here, a list of numbers, say, 0 through 30,000 or so, however, there are gaps in the numbers, so not purely sequential. I am faced with selecting one record from the dataset, that's simple, however, before that select, I need to make sure the record is there, and