首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 数据库 > oracle >

ORA-00984列在此处不允许

2014-01-28 
ORA-00984列在此处不允许:DECLARE CURSOR c_br IS SELECT * FROM broker_ret CURSOR c_hfhd (p_cuno VARCH

ORA-00984列在此处不允许:

DECLARE
CURSOR c_br IS SELECT * FROM broker_ret;
CURSOR c_hfhd (p_cuno VARCHAR2) IS
SELECT * FROM hs_his.hisfuholddrop
WHERE fund_account=p_cuno;
r_br broker_ret%ROWTYPE;
r_hfhd hs_his.hisfuholddrop%ROWTYPE;
BEGIN
OPEN c_br;
LOOP
FETCH c_br INTO r_br;
EXIT WHEN c_br%NOTFOUND;
DBMS_OUTPUT.PUT_LINE( 'part1 ok! ');
OPEN c_hfhd(r_br.cust_no);
LOOP
FETCH c_hfhd INTO r_hfhd;
EXIT WHEN c_hfhd%NOTFOUND;
IF r_br.ret_mode= '1 '
THEN execute immediate 'insert into broker_fund values
(r_hfhd.initdate,r_br.broker_no,r_br.cust_no,r_br.exch_code,r_br.vari_code,r_br.ret_mode,r_br.amt,r_br.business_amount*amt) ';
END IF;
IF r_br.ret_mode= '2 '
THEN execute immediate 'insert into broker_fund(tx_date,broker_no,cust_no,exch_code,vari_code,ret_mode,amt,fare) values         

热点排行