Re: Dynamic SQL without PL/SQL
Date: Fri, 07 Jun 2002 17:09:17 GMT
Message-ID: <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 Received on Fri Jun 07 2002 - 19:09:17 CEST