SQL错误1630:函数SUBSTRING不存在..呵? [英] SQL Error 1630: Function SUBSTRING does not exist.. huh?

查看:2568
本文介绍了SQL错误1630:函数SUBSTRING不存在..呵?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

右。所以我在MySQL数据库中创建了一个使用SUBSTRING的存储过程。



通过查询运行程序给了我:


SQL Error 1630:Function mydatabase.SUBSTRING does not exist


原文地址:http://blog.sina.com.cn/s/blog_4b0c8f0100b0.html问题补充:请问如何解决这个问题?

解决方案 在第一个括号之前?



出现在第40行:

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

确保

  select substring(CustomerName,1,4)AS MyName从MyTable; 

而不是:

  select substring(CustomerName,1,4)AS MyName从MyTable; 


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?

解决方案

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;

这篇关于SQL错误1630:函数SUBSTRING不存在..呵?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆