MySQL Forums
Forum List  »  Stored Procedures

Error Code 1305 FUNCTION xxx.CHARINDEX does not exist
Posted by: Todd Lane
Date: October 26, 2017 09:28PM

Hi,
Newbie here just trying to convert a sql sp

It all has to do with the following part of the statement that turns a field with ImageA|ImageB|ImageC|ImageD|ImageE into 5 new records in the additionalimages table

Code is

WHILE CHAR_LENGTH(RTRIM(p_AdditionalImages)) > 0
DO
INSERT INTO IH_Images (
`ItemID`
,`Filename`
) VALUES (
v_ItemID
,LEFT(p_AdditionalImages, CHARINDEX('|', CONCAT(p_AdditionalImages,'|')) -1)
);
SET p_AdditionalImages = INSERT(p_AdditionalImages, 1, CHARINDEX('|', CONCAT(p_AdditionalImages,'|')), '');
END WHILE;

Options: ReplyQuote


Subject
Views
Written By
Posted
Error Code 1305 FUNCTION xxx.CHARINDEX does not exist
8698
October 26, 2017 09:28PM


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.