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


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