On Tue, 8 Jun 2004, Vadim P. wrote:

> If  "surname" is a field, then use it without the single quotes ('),
> otherwise it is treated as a literal string and 0 is the correct result:
>
>       select locate(' ',surname,1) from advisers

Thanks a lot, this is working. I now need to figure out how to use the IF
syntax, etc (not done this before ;-) so that the result from thsi query
can be used as an argument for the next.

cheers,

Andy

> andy thomas wrote:
>
> >Yes, this is the approach I was thinking of using but:
> >
> >     select locate(' ','surname',1) from advisers
> >
> >just returns 0 for all records, whether or not they contain the ' ' space
> >substring.
> >
> >
> >
> >
>
>


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to