MYSQL 存储过程不能创建 请帮忙看看哪里错了
CREATEPROCEDUREUpdateSalesToResult(INSalesDatevarchar)BEGINUPDATElist_resulttINNERJOI...
CREATE PROCEDURE UpdateSalesToResult(IN SalesDate varchar)
BEGIN
UPDATE list_result t
INNER JOIN sales s
ON t.date_=s.date_ and t.storecode=s.storecode and t.itemcode=s.itemcode
SET t.StockQty=s.ystock,t.SalesQty=s.ysales
WHERE s.date_=SalesDate
END;
----------
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
BEGIN
UPDATE list_result t
INNER JOIN sales s
ON t.date_=s.date_ an' at line 1 展开
BEGIN
UPDATE list_result t
INNER JOIN sales s
ON t.date_=s.date_ and t.storecode=s.storecode and t.itemcode=s.itemcode
SET t.StockQty=s.ystock,t.SalesQty=s.ysales
WHERE s.date_=SalesDate
END;
----------
[Err] 1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
BEGIN
UPDATE list_result t
INNER JOIN sales s
ON t.date_=s.date_ an' at line 1 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询