我已创建存储过程如下
DELIMITER //
CREATE PROCEDURE gsx(IN location varchar(100),IN start timestamp,IN end timestamp)
As
BEGIN
SELECT count(CustomerFeed.overall) as sat FROM ContactCenter LEFT JOIN CustomerFeed ON ContactCenter.callId = CustomerFeed.callId
WHERE date(ContactCenter.callClose) BETWEEN start AND end
AND ContactCenter.callStatus = 'Close'
AND CustomerFeed.overall IN ( 1, 2 )
AND ContactCenter.location=location
and ContactCenter.gNum!='';
END
DELIMITER ;
但是通过调用类似
的过程来执行致电gsx('HO Bangalore','2013-07-01','2013-07-06')
我得到程序不存在
#1305 - 程序ampicare_crmdb.gsx不存在,但已成功执行
答案 0 :(得分:1)
如果您创建的程序与写入完全相同,则在END之后错过了分隔符。最后两行应该是:
END //
DELIMITER ;