Why you don't try:
BETWEEN '$surname_from' AND concat($surname_to,'z') ?
Makis
> -Original Message-
> From: Craig Shepherd [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, March 05, 2002 1:30 PM
> To: [EMAIL PROTECTED]
> Subject: BETWEEN... LIKE query
49
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: BETWEEN... LIKE query
>
>
> * Craig Shepherd
> > select * from consumers surname BETWEEN '$surname_from' AND
> '$surname_to'
> >
> > assume $surname_from = A and $surname_to = B
&g
* Craig Shepherd
> select * from consumers surname BETWEEN '$surname_from' AND '$surname_to'
>
> assume $surname_from = A and $surname_to = B
>
> would only return results where the surname is A or greater but
> less than B, but I would like to include all records where records
> also start with B
Hi,
I have a form with two fields surname_from and surname_to, I want to be able
to do a select query where the results will lie between these to values.
That's easy enough but I also want to include all results where the record
field (surname) matches the first part of the fields - in effect a B