views:

71

answers:

1

Right. So I've created a stored procedure in a MySQL DB which happens to use SUBSTRING.

Running the procedure via a query gives me:

SQL Error 1630: Function mydatabase.SUBSTRING does not exist

Beg your pardon?

+4  A: 

Is there a space after the method call to Substring before the first parenthesis?

It appears on Line 40:

 IF i > 1 AND j > 1 AND (s1_char = SUBSTRING (s2, j - 1, 1))

i.e. Ensure

select substring(CustomerName, 1, 4) AS CustName from MyTable;

instead of:

select substring (CustomerName, 1, 4) AS CustName from MyTable;
p.campbell
Bingo. Just tested that and that would seem to explain it!
Martin Smith
+1: Good catch!
OMG Ponies