0

我想这样做:

CREATE OR REPLACE PACKAGE BODY my_refresh_pkg AS

    TYPE r_data IS RECORD (
        ID       CHAR(10),
        STATUS   CHAR(12),
        "DATA"       CLOB
        );
    TYPE t_data IS TABLE OF r_data;

    l_data t_data;

    /** forward declarations */
    PROCEDURE firstProc;
    PROCEDURE secondProc;
    PROCEDURE thirdProc;

/** main method call */
PROCEDURE refresh AS
    BEGIN
        -- clean out old data
        DELETE FROM target_table;
            COMMIT;

        -- fetch working dataset
        SELECT id, status, "data"
        BULK COLLECT INTO l_data
        FROM source_table
        WHERE status <> 'INITIAL';

        -- call individual inserts
        firstProc;
        secondProc;
        thirdProc;


    END refresh;
[... proc definitions, etc ...]

我会以正确的方式解决这个问题吗?我的包没有编译;我收到“表或视图不存在”错误。我不知道它是否指的是表变量。

4

0 回答 0