1

我创建了如下存储过程

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 班加罗尔','2013-07-01','2013-07-06')

我得到的程序不存在

#1305 - PROCEDURE ampicare_crmdb.gsx 不存在,但已成功执行

4

1 回答 1

1

如果您创建的过程与所写的完全一样,那么您在 END 之后错过了分隔符。最后两行应该是:

END //
DELIMITER ;
于 2013-08-01T12:37:59.603 回答