This is a discussion on Storing the output from trigger in a text file within the Database Support forums, part of the Web Development category; How to store store the output from a trigger in text file CREATE OR REPLACE TRIGGER TRG_EMP_ENTRy AFTER INSERT OR ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| How to store store the output from a trigger in text file CREATE OR REPLACE TRIGGER TRG_EMP_ENTRy AFTER INSERT OR UPDATE OR DELETE ON STUDENT FOR EACH ROW DECLARE vMsg VARCHAR2 (30) := 'Statement Level Trigger Fired'; vInHandle utl_file.file_type; BEGIN IF INSERTING THEN DBMS_OUTPUT.put_line (vmsg || ' When Inserting'); ELSIF UPDATING THEN DBMS_OUTPUT.put_line (vmsg || ' When Updating'); END IF; END; plz tell me how to store the output in a text file.. Any idea....... ![]() ![]() ![]() ![]() |
| Sponsored Links |
| |||
| Hi, In MYSQL May be this helps you Code: DROP TRIGGER trg_test; CREATE TRIGGER trg_test AFTER INSERT ON table1 FOR EACH ROW BEGIN SELECT field1,field2 INTO OUTTFILE '<Destination Path with file extension' FIELDS TERMINATED BY '|' FROM table1 WHERE field_id = 10; END; Name|Value
__________________ -Murali.. |
| |||
| Hi murali, I tried this, i can write the output to a file,but get an error file already exists on the second process. Can u tell me what to do for this?
__________________ Selna. |
| |||
| Hi, Because we are creating new file everytime the Trigger fires and the file is in the same name. I think wont be a good one by writing into file using a Trigger. A Result set from the query can be written to the outfile once.
__________________ -Murali.. |
![]() |
| Thread Tools | |
| Display Modes | |
| |
LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/database-support/2345-storing-output-trigger-text-file.html | |||
| Posted By | For | Type | Date |
| mixcat: Blogs, Photos, Videos and more on Technorati | This thread | Refback | 07-20-2007 10:00 AM |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to read the text from a .pdf file? | vadivelanvaidyanathan | Software Testing | 0 | 01-28-2008 10:15 PM |
| convert Excel file to CSV(or text) file using java | mobilegeek | Java Programming | 2 | 09-06-2007 06:42 AM |
| Use of Text output value | Shanthi | Testing Tools | 1 | 08-25-2007 02:37 AM |
| how to open and retrive text file(.txt)? | una_noche | Java Server Pages (JSP) | 1 | 08-17-2007 03:27 AM |
| How to convert a word document/text document/PDF file into an image file? | kingmaker | C# Programming | 0 | 07-16-2007 11:23 PM |