SQL$HELP72.HLB  —  INSERT_FROM_FILENAME, Example
    Example 1: Adding a New Row Using Data from a Text File

    SQL> -- Declare a table cursor.
    SQL> DECLARE TABLE_CURSOR
    cont> INSERT ONLY TABLE CURSOR
    cont> FOR SELECT * FROM RESUMES;
    SQL> -- Open table cursor and insert values.
    SQL> OPEN TABLE_CURSOR;
    cont> INSERT INTO CURSOR TABLE_CURSOR
    cont> VALUES ('10065', NULL);
    1 row inserted
    SQL> -- Declare a list cursor.
    SQL> DECLARE LIST_CURSOR
    cont> INSERT ONLY LIST CURSOR
    cont> FOR SELECT RESUME WHERE CURRENT OF TABLE_CURSOR;
    SQL --Open list cursor.
    SQL> OPEN LIST_CURSOR;
    SQL> --Load text from file into LIST OF BYTE VARYING column.
    SQL> INSERT INTO CURSOR LIST_CURSOR
    cont> FILENAME 'resume_10065.sql' AS TEXT;
    SQL> CLOSE LIST_CURSOR;
    SQL> CLOSE TABLE_CURSOR;
    SQL> COMMIT;
Close Help