Procedure in PL/SQL and Oracle Application Express

Procedure in PL/SQL and Oracle Application Express

Post by ing_or » Sat, 24 Mar 2007 18:58:07


Hi All,

My question contains 2 Parts :

1) the first part : how can I Create a procedure in PL/SQL that
generate a text file for me baesed on a query of a table. For instance
the content of this table


ORDER_ID,CUSTOMER_ID,ORDER_TOTAL,ORDER_TIMESTAMP,USER_ID
1,1,1200,5-11-2006 13:17:45,2
2,2,599,31-10-2006 13:17:45,2
3,2,1999,26-10-2006 13:17:45,2




2) the second Part : after I make this procedure, how Can I be able to
excecute this procedure in Oracle Application Express , and as result
of that excecution the generated file will be placed in a specific
directory on my copmuter.

I appreciate very much your help.

Thanks inadvance
 
 
 

Procedure in PL/SQL and Oracle Application Express

Post by DA Morga » Sun, 25 Mar 2007 00:43:10


UTL_FILE

http://www.yqcomputer.com/


You can only write to the server to an address mappable from the server.
--
Daniel A. Morgan
University of Washington
XXXX@XXXXX.COM
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org

 
 
 

Procedure in PL/SQL and Oracle Application Express

Post by Valentin M » Sun, 25 Mar 2007 00:45:01


1. You do not need to develop a stored procedure for that: single SQL
could do it for you. Formatting can/should be done on the client (i.e.
SQL*Plus, Java, OAE, etc.).
2. To store the file in a specific place is, again, a client function,
not stored procedure - the Oracle server should not have access to
your machine, while the client has.