mysql的存储过程有语法错误
create PROCEDURE proc_SMSzonedata (@iFileNumber varchar (200))
AS
declare @cState varchar (50);
declare @cTransactorDesc varchar (200);
declare @cTransactor varchar (20);
declare @ddlTime varchar (50);
--批量修改
begin
update tzonedata set cState=@cState,cTransactorDesc=@cTransactorDesc,cTransactor=@cTransactor,
dtCreateTime = date_add(dtCreateTime,INTERVAL @ddlTime HOUR) where iFileNumber in (@iFileNumber)
--发送短息
insert into tsms (cMSMContent,cMobileNum,iReceiverID,iSendID,iGroupID,dtSendTime,dtCreateDate,iIsSucceed)
select ('['+t1.cLocation+']'+t1.cQuestion+'['+t1.iFileNumber+']'),t2.cPhoneNum,t2.cUserDesc,'ylk','0', DATE_ADD(Now
(),INTERVAL 12 hour),now(),0
from tzonedata t1, tperson t2
where t1.iFileNumber in (@iFileNumber) and t1.cStreet=t2.cStreet and t1.cTransactor=t2.cUserDesc
end
大家帮忙修改下,哪里写错了啊??mysql的,谢谢啦 mysql 存储
[解决办法]
一看就知道你有问题的地方了,mysql的所有表名和列名都要用··括起来(就是键盘上1左边的那个)。然后所有值都是用英文双引号括起来的
[解决办法]
你的iFileNumber字段是什么类型?
你传进去的@iFileNumber是什么样的?
你直接不写变量一个一个的输入试试看sql语句错在哪里