Re: Dynamic SQL without PL/SQL
Date: 7 Jun 2002 08:15:26 -0700
Message-ID: <a6cb04db.0206070715.295338af_at_posting.google.com>
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
$foo = "*";
$sth->prepare("select ? from ?");
something to that affect would work fine. check out these sites:
Perldoc for DBI
Make your connection to Oracle using DBI->connect
$bar = "dual";
$sth->execute($foo,$bar);
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
Received on Fri Jun 07 2002 - 17:15:26 CEST