2017-02-23 87 views
0
create procedure SpecialPrice(IN T_ID int,Discount_P Decimal(5,3)) 
Begin 

Update Ticket 
set Price=Price*Discount_P 
where T_ID = Ticket_ID ; 

[email protected] 

我想創建但是我無法創建該存儲過程將更新打折放在桌上門票價格一個存儲過程,它的主要錯誤,因爲我正在運行與IBM Data Studio的這些代碼在displaye這些錯誤旁邊請幫助使用存儲過程的問題

The errors : 

1)on the line Begin 

DB2 for Linux, UNIX, and Windows: "Begin 

Update Audience 
set Price=Price*Discount_P 
where T_ID = Ticket_ID" appears to be misplaced. 

2) On the line [email protected] 
    DB2 for Linux, UNIX, and Windows: Unexpected text "[email protected]" encountered. 

回答

1

設置語句終結者從;@在Data Studio中,編輯欄中 下你發現驗證。在那裏你可以改變語句終結者。

+1

或者你可以鍵入 - #SET TERMINATOR @ – jmueller