Here's a fun and slightly obfuscated method to do that:
my $usql=q{select username from dba_users};
my $aryRef = $dbh->selectall_arrayref($usql);
my @users = map { $aryRef->[$_][0] } 0..$#{$aryRef};
my $newSql = q{select from users where username in ('}
. join(q{','},@users) . q{')};
print "$
On 05/25/2005 04:46 AM, Malka Cymbalista said:
Our web server is running Apache 2.0.48 with mod_perl 1.99_12 on a Sun
machine running Solaris 9. We are running perl 5.8.1, DBI 1.39 and
DBD-Oracle 1.16. We are trying to connect from our web server to an
Oracle database that is on a different mac
if the second query is an Oracle, you can query across to almost all other
databases from an Oracle connection if you set it up.
http://www.oracle.com/technology/products/oracle9i/datasheets/gateways/gateway_rel2_ds.html
or iterate over the first result set inserting rows into a global temp t
Had to apply this patch to get DBD::Oracle to work on my RedHat FC3 system
which installed the include files over in /usr/include/oracle/version-#/...
Thanks much for the package.
*** Makefile.PL.ORG Fri Oct 22 02:07:04 2004
--- Makefile.PL Wed May 18 14:56:46 2005
***
*** 1250,1
Hello,
I forgot to mention, the first query is from a different database than the
second one. Unfortunately, a subquery is not an option.
D
> Daniel,
>
> Why not use a subquery? It'll be more efficient than using the array.
>
> Something like "SELECT * FROM ... WHERE ... IN (SELECT ...)";
>
>
>
On Wed, 25 May 2005 13:17:09 -0400, Michael Graham wrote:
Hi Michael
> Anyway, as much as possible we're trying to make the architecture
> of the framework transparent and let people write normal
> CGI::Application programs (including cgiapp_init, cgiapp_prerun,
> etc.) without interference. Ob
On Wed, 25 May 2005 14:40:49 -0400, Cees Hek wrote:
Hi Cees
> I'm not 100% which 'it' you are referring to here. I would
> consider the LogDispatch plugin ready for production use. If I
> still have a disclaimer in the docs about stability, I will remove
> it in the next distribution, as I hav
Daniel,
Why not use a subquery? It'll be more efficient than using the array.
Something like "SELECT * FROM ... WHERE ... IN (SELECT ...)";
HTH,
Anna
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 25, 2005 11:40 AM
To: dbi-users@perl.org
Hello dbi-users,
I'm relatively new to Perl DBI so bear with me as this might be very
simple for the gurus.
I would like to use the results of a query as an input to another query's
WHERE ... IN clause. This is simple enough but I can't figure out how to
avoid extracting and formatting each row fr
Currently running the following code snippet:
package DBIOracle;
use base 'DBI';
package DBIOracle::db;
use base 'DBI::db';
On a linux box running perl v5.6.1 built for i686-linux there are no issues.
However, on a Solaris box running perl 5.005_01 built for sun4-solaris
I get the following error:
Well, to start, you should **always** print the Oracle error message
($DBI->errstr). This will tell you more than we on this list could even hope
to guess.
Next, if it runs from the command line, then you most likely have a permissions
issue with either the Perl script itself, or the Oracle.so
Matthew Persico [mailto:[EMAIL PROTECTED] wrote:
> Turns out I was wrong - I got my test scripts crossed. Removing the ()
> did not fix the problem.
That's not too surprising, as removing the parentheses does not change
the semantics of the code at all:
% perl -MO=3DDeparse,-p -e '$dbh->disconn
Our web server is running Apache 2.0.48 with mod_perl 1.99_12 on a Sun
machine running Solaris 9. We are running perl 5.8.1, DBI 1.39 and
DBD-Oracle 1.16. We are trying to connect from our web server to an
Oracle database that is on a different machine. The script that we
wrote to do this runs p
13 matches
Mail list logo