Results 1 to 4 of 4

Thread: spooling

Hybrid View

  1. #1
    Join Date
    May 2007
    Posts
    1
    HI

    Dynamic spool is not posible through procedure but you can used UTL_FILE for generate dynamic file.

    Thanks

  2. #2
    Join Date
    May 2007
    Posts
    13
    Alternative would be to write data into one or more several temporary tables and then create flat files using temp tables after loop has finished.


    VERY ROUGH EXAMPLE BELOW:


    LOOP

    IF CONDITION1 MET THEN
    INSERT INTO TEMPTABLE1 VALUES (?)
    ELSE...
    INSERT INTO TEMPTABLE2 VALUES (?)
    FI

    END LOOP

    SPOOL REPORT1.SQL
    SELECT * FROM TEMPTABLE_1
    SPOOL OFF
    SPOOL REPORT2.SQL
    SELECT * FROM TEMPTABLE_2
    SPOOL OFF

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •