我已经创建了一个传递过程参数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('','','','','','','');