On Mon, 20 May 2002 07:58:04 -0800 Brian Avis <[EMAIL PROTECTED]> wrote:

> Thanks for the reply.  :)    The person who wrote that stuff  just told 
> me this morning that the stuff was written in SQLPlus.    
> . . .
> >Hint: SQL*Plus != SQL.

You can still translate them to Perl scripts.  The first couple will be
harder, but once you've done them, you will have lots of lovely boilerplate
for doing more with.  Perl gives you a lot more flexibility for summarizing
and writing the results.

I prefer to wrap DATE columns in TO_CHAR( col, 'YYYY-MM-DD' ) so they can
be sorted easier in Perl.  To discover which columns are DATE, I prepare()
and execute() a query with the same columns and tables but with 1=0 in
the WHERE clause.  Then I can get the column names and types from
$sth->{NAME} and $sth->{TYPE} and add the TO_CHAR around the columns I need
to before executing the main query.
-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.


Reply via email to