denzil_cactus has asked for the wisdom of the Perl Monks concerning the following question:
-------------------------------------------------------------------------------------------- I want to see the values which I am fetching from select query..#!/usr/bin/perl use DBI qw(:sql_types); $dbh=DBI->connect("$datasource","$user","$pwd"); my($input_booking_seq, $fax_header, $file_no,$input_print_rates, $myNo +teId, $printer_name); eval { $sth = $dbh->prepare($sql = q{ DECLARE user_id VARCHAR2(15); input_booking_seq VARCHAR2(20); fax_header VARCHAR2(10); file_no VARCHAR2(15); BEGIN select user_id,passkey, '//FAX(fax=' || passkey1, passkey2 into user_id,input_booking_seq,fax_header,file_no from edit_table where edit_table.tag = 'BOOKING' and edit_table.key = 'PRINT' and id=3; END; }) or die $dbh->errstr; $sth->bind_param(":user_id",$user_id); $sth->bind_param(":input_booking_seq",$input_booking_seq); $sth->bind_param(":fax_header",$fax_header); $sth->bind_param(":file_no",$file_no); $sth->execute; }; if($@){ print "Failed : $DBI::errstr \n"; $dbh->errstr; }else{ print "Returned $user_id,$input_booking_seq,$fax_header,$file_no \n"; } $dbh->disconnect;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem in Executing PL/SQL block with Perl
by monarch (Priest) on Jul 09, 2007 at 13:03 UTC | |
|