Re: SQLPlus with Perl
- From: "The alMIGHTY N" <natlee75@xxxxxxxxx>
- Date: 2 Nov 2006 08:06:14 -0800
xhoster@xxxxxxxxx wrote:
"The alMIGHTY N" <natlee75@xxxxxxxxx> wrote:
Hi all,
I've been assigned a project involving SQLplus calls to an Oracle
database within Perl code. I have examples of how to perform insert and
update statements that don't return anything back to the code, but I
now need to perform a select statement to check values in the database.
How would I go about executing SQLplus calls and assigning the results
to a Perl string or array?
SQL*Plus is Oracle's command line user interface for a *human* to connect
to and use an Oracle database. Perl is not a human. 99+% of the time,
you should use DBI and DBD::Oracle, not SQL*Plus, to connect Perl to an
Oracle database server. It might take a little more work to get
DBD::Oracle installed and set up, but from then on it will be much better
than hacking things together with SQL*Plus.
That said, you could run sqlplus in backticks and parse the returned
value.
Xho
--
-------------------- http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB
Hi, thanks for the reply! After all the searching I've done these past
couple of days, I came to the same conclusion. I'm putting together a
quick script that uses DBI to do everything, but I'm still holding out
hope that there's some solution to this (the senior developers are not
keen on adding a new module to the system especially since this is such
a small part of the applicatiion).
How would one go about running sqlplus "in backticks"?
Thanks,
NL
.
- Follow-Ups:
- Re: SQLPlus with Perl
- From: Peter Scott
- Re: SQLPlus with Perl
- From: J. Gleixner
- Re: SQLPlus with Perl
- References:
- SQLPlus with Perl
- From: The alMIGHTY N
- Re: SQLPlus with Perl
- From: xhoster
- SQLPlus with Perl
- Prev by Date: Re: SQLPlus with Perl
- Next by Date: Masking/Hiding a password in Perl Source
- Previous by thread: Re: SQLPlus with Perl
- Next by thread: Re: SQLPlus with Perl
- Index(es):
Relevant Pages
|
Loading