Re: Dynamic SQL without PL/SQL

From: Adam Hapworth <hap_at_mikomi.org>
Date: 8 Jun 2002 06:34:46 -0700
Message-ID: <a6cb04db.0206080534.313a8dd8_at_posting.google.com>


Kent Lewin <giganews_at_lewin.org> wrote in message news:<pan.2002.06.07.17.07.45.513390.2639_at_lewin.org>...
> On Fri, 07 Jun 2002 10:15:26 -0600, Adam Hapworth wrote:
>
> > brotherhou_at_yahoo.com (konghou) wrote in message
> > news:<c19678a1.0206070049.7837dc26_at_posting.google.com>...
> >> Is it possible to produce dynamic SQL (changable table names and
> >> selection criteria) without PL/SQL, e.g. through ODBC.
> >
> > Use Perl and it's DBI module with the DBD::Oracle driver and you could
> > do something like this
> > Make your connection to Oracle using DBI->connect
> >
> > $foo = "*";
> > $bar = "dual";
> >
> > $sth->prepare("select ? from ?");
> > $sth->execute($foo,$bar);
> >
> > something to that affect would work fine. check out these sites:
> > Perldoc for DBI
> > http://www.perldoc.com/perl5.6.1/lib/DBI.html DBI::Oracle Documentation
> > http://search.cpan.org/doc/TIMB/DBD-Oracle-1.12/Oracle.pm
> >
> > have fun
> > Adam
>
> I have heard that DBD::Oracle-1.12 doesn't work with oracle 9i. I have
> tried to get it to compile and have been unsuccessful. Have you
> experienced otherwise?
>
> Thanks,
>
> Kent

I haven't had any problems with it on our 8 database. I have not heard anything about difficulties with 9i. Take a look at the perl.dbi.users group there seem to be a few discussions about DBD::Oracle and 9i. I also foud this thread that may be useful. http://groups.google.com/groups?hl=en&lr=&q=DBD%3A%3AOracle+oracle+9i&meta=group%3Dcomp.lang.perl.*

Adam Received on Sat Jun 08 2002 - 15:34:46 CEST

Original text of this message