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

Home -> Community -> Usenet -> c.d.o.misc -> Doing ANYTHING in PL/SQL is such a chore!

Doing ANYTHING in PL/SQL is such a chore!

From: James Reynolds <jreynold_at_nyx.nyx.net>
Date: 27 Feb 2002 19:35:17 -0700
Message-ID: <1014863716.571971@irys.nyx.net>


I've been programming in PL/SQL on-and-off for a few years, writing mainly small packages for data manipulation. Now I'm working on a larger project and I'm discovering how difficult it is to write good, modular code for use across the enterprise.

Can either of these basic tasks be done without a kludge?

#1 - a CSV procedure that takes an arbitrary row of data and returns a
comma-delimited string

#2 - run a stored procedure in SQL*Plus and have output go to stdout
(like running a select does)

IMHO, the inability to determine the fields in a %ROWTYPE variable is a *huge* shortcoming of the language and contributes to large amounts of non-reusable code all of the place. Am I missing something obvious here?

As far as #2 goes... I understand why it's not possible-- a procedure runs on the database server with no access to client file descriptors. But I'd expect there to be some way to "unload" the DBMS_OUTPUT buffer as it fills up. I want to output 2GB of data to a file and redirect the output from SQL*Plus to a file. I can do some of what I want with a function, but it's not as general as it could be.

Can anyone offer any workarounds that aren't too ugly and perform well on high volumes of data?

Thanks in advance. Received on Wed Feb 27 2002 - 20:35:17 CST

Original text of this message

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