0
嗨,我們正在努力執行下面的腳本,我們 是得到錯誤的光標給錯誤
ERROR at line 1:
ORA-20000: Unknown Exception Raised: -933 ORA-00933: SQL command not properly
ended
ORA-06512: at line 23
DECLARE
l_cursor INTEGER;
l_output VARCHAR2(20);
l_rows INTEGER;
l_sql VARCHAR2(1000);
BEGIN
l_cursor := DBMS_SQL.OPEN_CURSOR;
l_sql := 'SELECT wk_units1 FROM cnt_sls_dm.fct_sales.summary UNION SELECT wk_units2 FROM cnt_sls_dm.fct_sales.summary';
DBMS_SQL.PARSE(l_cursor, l_sql, DBMS_SQL.NATIVE);
DBMS_SQL.DEFINE_COLUMN_CHAR(l_cursor, 1, l_output, 20);
l_rows := DBMS_SQL.EXECUTE(l_cursor);
loop
if DBMS_SQL.FETCH_ROWS(l_cursor) = 0 then
exit;
end if;
DBMS_SQL.COLUMN_VALUE_CHAR(l_cursor, 1, l_output);
DBMS_OUTPUT.PUT_LINE('Output Text '||l_output);
end loop;
DBMS_SQL.CLOSE_CURSOR(l_cursor);
EXCEPTION
when others then
DBMS_SQL.CLOSE_CURSOR(l_cursor);
raise_application_error(-20000, 'Unknown Exception Raised: '||sqlcode||' '||sqlerrm);
END;
日Thnx這是cnt_sls_dm.fct_sales_summary – Irveen 2009-09-01 09:02:41