exec home_lending_cus('9999999999', 'HOME LENDING', '11111111')
我想運行上面的語句,但它拋出了下面提到的錯誤。如何運行程序
ORA-00933: SQL Command not properly ended.
ORA-06512: at 'HOME_LENDING_CUS', line 6
ORA-06512: at line1
所有varchar2
CREATE OR REPLACE PROCEDURE home_lending_cus(
id_no VARCHAR2,
prod_nme VARCHAR2,
rpt_dte NUMBER) authid current_user
AS
BEGIN
EXECUTE immediate
' CREATE TABLE abc AS
SELECT bt.id,
ct.cus_id
FROM bnkr_tbl bt ,
cus_tbl ct ,
base_tbl bt
WHERE bt.id =ct.id
AND ct.id =bt.c_id
AND bt.pr_nme='||prod_nme|| '
AND bt.dte ='||rpt_dte|| '
AND bt.id ='||id_no|| '
GROUP BY bt.id,
ct.cus_id';
END home_lending_cus;
你在哪個上下文/應用程序中嘗試執行該過程?可能僅僅是在行結尾缺少';'... – evilive 2014-11-25 06:29:43
這意味着你的PL/SQL代碼中有語法錯誤。你還沒有發佈源代碼,所以我們不能告訴你它是什麼。但是,該消息包含LINE NUMBER,因此您確切知道在哪裏查找。 – APC 2014-11-25 06:30:57
源是這裏 創建或替換過程home_lending_cus(id_no上VARCHAR2,prod_nme VARCHAR2,rpt_dte數) AUTHID CURRENT_USER作爲 開始 執行即時'創建表ABC作爲 選擇bt.id,從 bnkr_tbl ct.cus_id BT , cus_tbl ct ,base_tbl bt 其中 bt.id = ct.id 和ct.id = bt.c_id 和bt.pr_nme ='|| prod_nme || '和bt.dte ='|| rpt_dte || '和bt.id ='|| id_no || 'group by bt.id,ct.cus_id'; end home_lending_cus; – 2014-11-25 10:30:51