我試圖在用Java調用的Sybase數據庫中創建一個存儲過程,並獲取填充2個獨立表的輸入參數;一些爭論進入兩者,一些只進入其中一個表格。創建存儲過程錯誤Sybase
這裏是我的存儲過程的代碼:
Create procedure dbo.ps_bau_insert (in userID varChar(8), in busReason varChar(800), in weekID Integer,
in qScript varChar(800), in success BIT, in rowsAffected varChar(100))
BEGIN
Insert into dbo.tbau_request_details
(weekID, userID, Date, qScript, BusReason, Success, Rows)
values (weekID, userID, getDate(), qScript, busReason, success, rowsAffected)
Insert into dbo.tbau_request_cm
(userID, Date, BusReason, Success, Rows)
values (userID, getDate(), busReason, success, rowsAffected);
End
,我發現了錯誤:
Error report -
Incorrect syntax near the keyword 'BEGIN'.
至於我可以看到(通過查看Sybase文檔)語法是正確的;錯誤陳述另有說明。有人能幫我看看這裏有什麼不正確嗎?
謝謝!