MySQL Forums
Forum List  »  Newbie

Re: Need help with LOCATE statement
Posted by: Felix Geerinckx
Date: August 04, 2005 07:28AM

Patrick Kelly wrote:

> Example 1: If the value sought after equals Spindle 12:104 and the only value in the
> References field is Spindle 12:101-104 then the value sought after is found.
>
> Example 2: If the value sought after equals Spindle 12:104 and the values in the References
> field are ; Maxten 111:94 ; Tendor 12:93 ; Spindle 12:101-104 ; Trund 11:22 ;
>
> The LOCATE statement does not see the sought after value.

Did you mess up your examples, because in both cases LOCATE() will return 0, since
'Spindle 12:104' is *not* a substring of either 'Spindle 12:101-104' or of
'; Maxten 111:94 ; Tendor 12:93 ; Spindle 12:101-104 ; Trund 11:22 ;'?

--
felix
Please use BBCode to format your messages in this forum.

Options: ReplyQuote


Subject
Written By
Posted
Re: Need help with LOCATE statement
August 04, 2005 07:28AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.