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

Home -> Community -> Usenet -> c.d.o.server -> Re: Cursor output to CSV

Re: Cursor output to CSV

From: Helge <hmoulding_at_gmail.com>
Date: 11 Jun 2006 11:54:24 -0700
Message-ID: <1150052064.006706.80650@u72g2000cwu.googlegroups.com>


Mladen Gogala wrote:
> Maybe, if you provided us with some more details, we would be
> able to give you some more information.

OK. I have a number of Crystal Reports in my application that use PLSQL procedures as data sources. Each PLSQL procedure has a ref cursor as output, and that's used by Crystal Reports to generate a pretty output. These reports are generated "on demand."

At the same time I need to be able to push the same information that is in the reports to other servers in various departments. This has to happen at predefined times, e.g. every day, once a week, on the last day of each month, etc. A database connection is not an option, which is why I have to write a flat file.

Clearly the same procedures that generate the Crystal Reports should generate the data for the csv files. So what I need to be able to write is
something like:

create or replace procedure report1(rc out refcur_pkg.rc) is ...
create or replace procedure report2(rc out refcur_pkg.rc) is ...
create or replace push_reports is
rc ref cursor;
begin
report1(rc);
output_csv(rc);
close rc;
report2(rc);
output_csv(rc);
close rc;
end;

If I have to write output_csv in some other language than PLSQL, that's

not a problem, but I need to know where to read up on the Oracle API that supports this. Received on Sun Jun 11 2006 - 13:54:24 CDT

Original text of this message

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