Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    22

    Question Unanswered: PL SQL Trigger and file write

    Greetings.

    Below is the given scenario.

    1. Table T1 currently has 10 records.

    2. A record will be inserted/updated in Table T1.

    3. Assuming an insert was done, a trigger has to kick off.

    4. Stored proc has to be called by the trigger which inturn picks the data from Table T1 and writes to a file.

    5. The data in the file should contain all the 11 records (inclusive of one inserted which resulted in firing the trigger).

    Can anyone help me in this regards.

    Thanks in advance.
    Aravind

  2. #2
    Join Date
    Apr 2003
    Location
    Greenville, SC (USA)
    Posts
    1,155
    Have the trigger put a job in the dbms_job queue that executes the procedure (to be executed in sysdate + 1 second) ... that way the row is commited in the T1 table. The job will start (based on the init.ora parameters job_quue_processes and interval) and execute the proc that will read T1 and insert into "other table" all rows ...

    HTH
    Gregg

Posting Permissions

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