Sponsored Content
Top Forums Shell Programming and Scripting calling a plsql procedure through shell script Post 302580860 by durden_tyler on Saturday 10th of December 2011 11:48:25 AM
Old 12-10-2011
I don't quite understand the code fully.

(1) Could you please put your code within code tags? It's difficult to read as it is.

(2) You have two overloaded procedures called "create_1099k_data". One calls the other, you set p_startdt and p_enddt in the wrapper, and pass it to the other. But you don't use it in the second procedure! What's the point of passing it then?

(3) What's the purpose of the "proc_name" local variable in the invoked procedure? It's declared and assigned, but never used.

(4) There's a MERGE statement inside a CURSOR..FOR loop in the invoked procedure. You fetch data from "portfolio_merchants" in the cursor query, but then you also use the same table/view in the SELECT part of the MERGE statement. If that's the case, then you could probably do away with the CURSOR..FOR loop by adding the filter conditions of the cursor query into the SELECT part of the MERGE.

(5) Finally, your first post mentions something about "piecewise" processing, but I don't see how or where it is applicable in the posted code.

tyler_durden
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

calling stored procedure from shell script.

Hi All, This is a very starnge problem I am having. I have a shell script that calls a stored procedure. Here's my code in shell script: sqlplus "userid/pwd" @file.sql and file.sql has the following statement: exec my_storedProc; Now, when I execute my shell script, nothing... (2 Replies)
Discussion started by: priyamurthy2005
2 Replies

2. Shell Programming and Scripting

Calling stored procedure from shell script

HI, I have a similar problem to thread 18264, only I couldn't get it to work. https://www.unix.com/showthread.php?t=18264 I have a stored procedure which is called by a shell script program. When I run the stored procedure alone or through the shell script, it works fine with output text... (3 Replies)
Discussion started by: dorisw
3 Replies

3. Shell Programming and Scripting

Calling an Oracle Stored Procedure from Unix shell script

hai, can anybody say how to call or to execute an oracle stored procedure in oracle from unix... thanks in advance.... for ur reply.... by, leo (2 Replies)
Discussion started by: Leojhose
2 Replies

4. UNIX for Advanced & Expert Users

calling plsql function in a unix script

Could anyone please help me. I have a function in plsql that returns a number. But i am listing some records through that function using DBMS_OUTPUT.PUT_LINE. I want to catch those records by executing this function through a unix script. The following shows what i did echo "Connected from... (2 Replies)
Discussion started by: cobroraj
2 Replies

5. Programming

Calling procedure through Unix Shell

Hi can anyone help me in how to 1) invoke batch profile to run sqlplus on XXXXX server. 2) execute truncate table xtra.xtra_card_email_request using procedure dbadmin.truncate_table . 3) Check the count before and after the job run. (1 Reply)
Discussion started by: jakred
1 Replies

6. Shell Programming and Scripting

Calling procedure through Unix Shell

how to 1) invoke batch profile to run sqlplus on XXXXX server. 2) execute truncate table xtra.xtra_card_email_request using procedure dbadmin.truncate_table . 3) Check the count before and after the job run. (1 Reply)
Discussion started by: jakred
1 Replies

7. UNIX for Advanced & Expert Users

Calling unix script from sql or plsql

Hi Can anyone please let me know how to call unix scripts from sql or plsql ASAP. (2 Replies)
Discussion started by: ksailesh
2 Replies

8. Shell Programming and Scripting

calling pl/sql procedure from shell and return values

How could I call an Oracle PL/SQL procedure from any shell (bash) and catch returning value from that procedure (out param) or get a returning value if it's a function. also, I got into trouble when I tried to send a number as a param #!/bin/bash -e username=$1 pwd=$2 baza=$3... (0 Replies)
Discussion started by: bongo
0 Replies

9. Shell Programming and Scripting

Script to give plsql procedure output

##Execute the EDW_MEM_KEY_UPDATE procedure ext_sta=`sqlplus -s ${Connstr} <<eof set heading off; set pagesize 0; set feedback off; set serveroutput on; execute EDW_MEM_KEY_UPDATE ; quit; here` vara="ORA-" var=`echo $ext_sta | grep -c $vara ` Hi All, above is a part of my unix... (7 Replies)
Discussion started by: iamnoone
7 Replies

10. Shell Programming and Scripting

Sub script calling procedure

Hi, I have a doubt regarding how sub scripts will be executed and interested to know internal workflow, For example - My main script is A,it calls a script B then B will call some C....and so on. Then B script run parallel to A or it will wait B to execute then A will continue. ... (1 Reply)
Discussion started by: nag_sathi
1 Replies
OCI_FETCH_ROW(3)														  OCI_FETCH_ROW(3)

oci_fetch_row - Returns the next row from a query as a numeric array

SYNOPSIS
array oci_fetch_row (resource $statement) DESCRIPTION
Returns a numerically indexed array containing the next result-set row of a query. Each array entry corresponds to a column of the row. This function is typically called in a loop until it returns FALSE, indicating no more rows exist. Calling oci_fetch_row(3) is identical to calling oci_fetch_array(3) with OCI_NUM + OCI_RETURN_NULLS. PARAMETERS
o $statement -A valid OCI8 statement identifier created by oci_parse(3) and executed by oci_execute(3), or a REF CURSOR statement identifier. RETURN VALUES
Returns a numerically indexed array. If there are no more rows in the $statement then FALSE is returned. EXAMPLES
Example #1 oci_fetch_row(3) Example <?php $conn = oci_connect('hr', 'welcome', 'localhost/XE'); if (!$conn) { $e = oci_error(); trigger_error(htmlentities($e['message'], ENT_QUOTES), E_USER_ERROR); } $stid = oci_parse($conn, 'SELECT department_id, department_name FROM departments'); oci_execute($stid); while (($row = oci_fetch_row($stid)) != false) { echo $row[0] . " " . $row[1] . "<br> "; } oci_free_statement($stid); oci_close($conn); ?> NOTES
Note See oci_fetch_array(3) for more examples of fetching rows. SEE ALSO
oci_fetch(3), oci_fetch_all(3), oci_fetch_array(3), oci_fetch_assoc(3), oci_fetch_object(3). PHP Documentation Group OCI_FETCH_ROW(3)
All times are GMT -4. The time now is 01:33 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy