Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Error 1630: Function SUBSTRING does not exist.. huh?

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?

like image 677
Robin Rodricks Avatar asked Aug 17 '10 22:08

Robin Rodricks


1 Answers

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;
like image 135
p.campbell Avatar answered Sep 24 '22 17:09

p.campbell