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

Home -> Community -> Usenet -> c.d.o.tools -> PL/SQL Questions

PL/SQL Questions

From: R. Burton <rburton_at_rohms.com>
Date: 1997/06/11
Message-ID: <339F24AE.3EF3@rohms.com>#1/1

I have a few questions for you PL/SQL people out there; please send any replies to rburton_at_rohms.com

  1. Is there a canned procedure to display the contents of an ascii file (specifying the filespec as a parameter)? If not, can someone give me an example of such a proc? And how would I know if the specified file was not found?
  2. I'm doing some web-oracle work, using PL/SQL with the OWA/WRB; I'd like to write generic stored procedures that can optionally redirect output to a text file on the server in addition to (or instead of) dumping the results to the user's browser. How might this be accomplished?

I'm using the htp package to send output (i.e. htp.print('hello ..') ) Will spool work with htp.print? I can't seem to get it to work in PL/SQL at all.

If I was doing this under C, it would be simple - I'd write all my output routines to use a file handle, and depending upon whether I wanted the output to go to the display or a file, I'd set the file handle appropriately. Is there a way this can be done in PL/SQL? (I'm aware I could use Pro*C, but I'm not there just yet)

3. Is there a function that formats a number value on the fly that can be used in htp.print? I have a table column which lists a price, but if the number is 6.2, I want it to print 6.20 (i.e. format 9990.99). I don't seem to be able to use the 'column format' declarations in PL/SQL, or I don't know where/when/how to specify them - I'm using a cursor. Any ideas?

Thank you very much for any help!

Richard Burton
rburton_at_rohms.com Received on Wed Jun 11 1997 - 00:00:00 CDT

Original text of this message

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