in reply to Re3: Sqlplus -> DBD::Oracle Question
in thread Sqlplus -> DBD::Oracle Question

I guess what I want is all the functionality of SQLPlus in Perl in as few lines of code.

As good as it is, using the approach you lay out above I'll have to write a perl sub for each sql query to further refine the report.

I am trying to create a setup which holds all the report definitions in XML and pulls them in and processes via generic code.

This approach requires query specific perl code to function.

  • Comment on Re: Re3: Sqlplus -> DBD::Oracle Question

Replies are listed 'Best First'.
Re5: Sqlplus -> DBD::Oracle Question
by dragonchild (Archbishop) on Apr 10, 2003 at 15:49 UTC
    You have report layouts in XML and you want to use Perl for that. Ok ... this is important info.

    From what I know, there is no single templating system that will map XML layouts to SQL queries and produce HTML. However, you can glue together a few different components and come up with a generic solution. However, it won't be just a "few lines of code". My best guess would be that you would have to look at redesigning the system.

    However, the benefit is that you're not limited to just what you could do in SQLPlus. For example, once you have your templates in HTML::Template, a few minor changes and you can use PDF::Template to output the reports in PDF. No code changes required. Outputting to Excel format is also similarly easy (though there is no XLS::Template ... yet).

    Of course, and as always, YMMV.

    ------
    We are the carpenters and bricklayers of the Information Age.

    Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.

    Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.