Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: dynamic SQL & user defined types

RE: dynamic SQL & user defined types

From: David Barbour <DBarbour_at_connectsouth.com>
Date: Fri, 27 Oct 2000 14:58:08 -0500
Message-Id: <10662.120503@fatcity.com>


John,

If you can set the file handle using a variale, you shuold be able to use that variable in the function as well.

For instance, I have a cursor that selects information including the employee ID from a table. I declare v_empID after I define my cursor.

My util_file statement looks like this:

                file_out UTL_FILE.FILE_TYPE;
BEGIN

		**********OPEN CURSOR HERE**********
	       file_out  := UTL_FILE.FOPEN('/tmp', || v_empID || ,'W');

		**********LATER IN THE PROGRAM**********

		htp.tableData(htf.fontOpen( cface => 'HE_TERMINAL', csize =>
'-2') ||getSalesRep(TO_NUMBER(v_empID||
htf.fontClose, cattributes => 'bgcolor = "'||bgcolor||'"'
                               	   );

Might not be exactly what you're looking for, but maybe it'll help churn some ideas around. There are loops and some other things, including other functions driven off the v_empID. This produces customized files for each employee, but depending on how you're generating the file_name, there are several ways you can accomplish the same thing.

Regards,

David A. Barbour
Oracle DBA - ConnectSouth
512-681-9438
dbarbour_at_connectsouth.com

-----Original Message-----
From: John Dunn [mailto:john.dunn_at_sefas.co.uk] Sent: Friday, October 27, 2000 12:01 PM
To: Multiple recipients of list ORACLE-L Subject: dynamic SQL & user defined types

> Is there a way to pass a utl_file.file_type filehandle to a function
> called using dynamic SQL?
>
> I've tried passing it as an integer but it didn't appear to work.
>
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: John Dunn
  INET: john.dunn_at_sefas.co.uk

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Fri Oct 27 2000 - 14:58:08 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US