Hi All, As I hv never used Oracle with Perl...I am unable to get the values which I am fetching in PL/SQL variables.. Can anyone please look into this problem? Here my code ------------------------------------------------------
#!/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;
-------------------------------------------------------------------------------------------- I want to see the values which I am fetching from select query..

In reply to Problem in Executing PL/SQL block with Perl by denzil_cactus

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.