Hi ,
The backend stored procedure , HOW can a stored procedure accept an array first .You are thinking of passing an array to stored procedure , but how iwll a stored procedure accept it
The procedure written like
CREATE OR REPLACE PROCEDURE (?????(the array cannot be used ) IN)
+ as
You can only use
CREATE OR REPLACE PROCEDURE (v_scalr_in IN) as
Hence trying to pass an array to a stored procedure which can never accept an array is not how it could be working
That you could do is concatenate the scalar values into a single scalar value in perl and then send it to the Orcale stored procedure and then parse it with substr inside the oracle procedur and use it like
my $a;
foreach (@arrayofvariables){
$a .= $_;
}
my $proc_run = "BEGIN
run_proc(:1)
END\;"
# then bind it with $a
The stored procedure has to
CREATE OR REPLACE PROCEDURE ( v_scalar_in IN VARCHAR) AS
here you have to substr with the index of "," and then send it i
+n for loop for your processing
The idea of sending arrays to stored procedures is not that good in that stored procedures , I mean the databases do not have these array only the table and record type , mya be try using those
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.