farhan has asked for the wisdom of the Perl Monks concerning the following question:
test File ias as#!F:/perl/bin/perl.exe use DBI; open(FH,"C:/ehealth/custom/Script/test"); foreach $fin (<FH>) { my($final) = split(/\n/,$fin); my $dbh = DBI->connect( 'dbi:Oracle:xxxxxxx','xxxxxx','xxxxxx',{ RaiseError => 1, AutoCommit => 0 } ) || die "Database connection not made: $DBI::er +rstr"; my $sql = qq(select c.name from NH_Element a, nh_group_members b, nh_g +roup c where a.element_id = b.element_id and b.group_id = c.group_id +and a.name='$final' ORDER by c.name); my $sth = $dbh->prepare( $sql ); $sth->execute(); my($alias); $sth->bind_columns( undef,\$alias); while($sth->fetchrow_array()) { print "$alias\n"; } $sth->finish(); $dbh->disconnect(); } close(FH);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: PERL DBI Oracle
by Krambambuli (Curate) on May 15, 2007 at 07:09 UTC | |
|
Re: PERL DBI Oracle
by Moron (Curate) on May 15, 2007 at 11:55 UTC | |
by farhan (Novice) on May 16, 2007 at 01:04 UTC | |
by farhan (Novice) on May 16, 2007 at 02:44 UTC | |
by Moron (Curate) on May 16, 2007 at 12:36 UTC | |
|
Re: PERL DBI Oracle
by chrism01 (Friar) on May 15, 2007 at 06:44 UTC | |
by farhan (Novice) on May 15, 2007 at 06:59 UTC |