准备好的语句需要重新准备。存储过程错误

时间:2019-04-13 08:46:21

标签: mysql

我已经创建了一个传递过程参数7的存储过程,这些参数构成了要执行查询的查询,但是查询无法正常工作,因此我尝试使用下面给出的示例查询。

但这也无法正常显示错误

准备好的陈述需要重新准备

 BEGIN
 /*set @vCommn = concat(Q1,Q2,Q3,Q4,Q5,Q6,Q7);*/
 Set @vCommn=concat('Insert into sh_comm_history (CustId, AccId, AccNo, Subject, Content, CommType, CommDt, MobileNo, PresName, CommMode, Status, InsDt) select b.CustId, a.AccId, a.Accno, ','"SMS","' ,'test','" as SMSTxt,"SEND",CURRENT_TIMESTAMP,b.PresMobile,b.PresName,"SMS","N",CURRENT_TIMESTAMP from sh_account a, sh_customer b where a.AccNo="','AH0024','"  and b.CustId in (','2155,2158,2157,2156',');');


 prepare sql_query from @vCommn;
 execute sql_query;
 END


CALL Receipt_SMSIns('','','','','','','');

0 个答案:

没有答案