Error in calling store procedure using SQLPLUS in unix


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Error in calling store procedure using SQLPLUS in unix
# 1  
Old 06-21-2010
Error in calling store procedure using SQLPLUS in unix

Hi,
I am facing the following error in calling the stored procedure from SQLPLUS in unix environment.

Code:
SQL> set serveroutput on
SQL> var store number;
SQL> exec test_proc(:store, 200);
BEGIN TEST_PROC(:store, 200); END;
*
ERROR at line 1:
ORA-01858: a non-numeric character was found where a numeric was expected
ORA-06512: at "TEST_PROC", line 111
ORA-06512: at line 1

The definition of the stored procedure is :
Code:
procedure test_proc(
  store out number,
  key number)     
is
declare
...
begin
...
end test_proc;

Please tell me how should I pass a numeric value here in order to make this procedure run.

Thanks
Pradeep

Last edited by pradeep7986; 06-21-2010 at 03:03 AM.. Reason: added the line 'end test_proc' in the end where only end was written
# 2  
Old 06-21-2010
Quote:
line 111 ...
You should check that line (or provide the entire code).
# 3  
Old 06-21-2010
there can be an error anywhere else in the code.... before line 111. if ur mising any brackets, paranthesis or some small syntax error u will have to check that very carefully.
This User Gave Thanks to dazdseg For This Post:
# 4  
Old 06-21-2010
Quote:
Originally Posted by dazdseg
there can be an error anywhere else in the code.... before line 111.[...]

This is definitely more accurate Smilie
This User Gave Thanks to radoulov For This Post:
# 5  
Old 06-21-2010
i am definately a noob in unix as compared to radoulov. but i like sarcasm ;p

thanks.
# 6  
Old 06-21-2010
I suppose I was not clear Smilie

My statement was quite inaccurate.

As you correctly pointed out, the error could be anywhere before (and including) line 111.

Sorry for the confusion.
# 7  
Old 06-21-2010
radoulov i understood what u said.. i was just kidding around. sorry about me kidding.
there is no sense of humor here Smilie
[take it as a small joke] sorry again
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Control not returning from Sqlplus to calling UNIX shell script.

Hello All, I have exactly same issue @vikas_trl had in following link: https://www.unix.com/shell-programming-and-scripting/259854-control-not-returning-sqlplus-calling-unix-shell-script.html I wonder if he or somebody else could find the issue's cause or the solution. Any help would... (4 Replies)
Discussion started by: RicardoQ
4 Replies

2. How to Post in the The UNIX and Linux Forums

Calling a Sybase Stored procedure from a UNIX Script

Hi, I am new to shell scripting and Sybase database i need a help that i try to execute a SYBASE stored procedure from a Unix shell script and wanna write the output of the SP into a Text File.somehow i try to find a solution but whwn i try to run the script i am not getting the output file with... (1 Reply)
Discussion started by: Arun619
1 Replies

3. Shell Programming and Scripting

Control not returning from Sqlplus to calling UNIX shell script.

Hello All, I have a UNIX script which will prepare anonymous oracle pl/sql block in a temporary file in run time and passes this file to sqlplus as given below. cat > $v_Input_File 2>>$v_Log << EOF BEGIN EXECUTE IMMEDIATE 'ALTER SESSION FORCE PARALLEL DML PARALLEL 16'; EXECUTE... (1 Reply)
Discussion started by: vikas_trl
1 Replies

4. UNIX for Dummies Questions & Answers

calling a unix shell script from sqlplus

I want to execute a shell script from sqlplus prompt and get its output back to sqlplus. Is this possible? if yes just give me an example for doing that. (2 Replies)
Discussion started by: boopathyvasagam
2 Replies

5. Shell Programming and Scripting

how to store the return values of stored procedure in unix shell script.

hi i am calling a oracle stored procedure(in the database) from unix shell scripting (a.sh). the called stored procedure returns some values through OUT variables i want to assign the return values of stored procedure in to unix shell script variable. can you provide me the code. ... (1 Reply)
Discussion started by: barani75
1 Replies

6. UNIX for Dummies Questions & Answers

Calling stored procedure from unix

Hi, My stored procedure returns a value. How to retrieve the value and display in unix. Stored procedure CREATE OR REPLACE PROCEDURE gohan(num INT) IS BEGIN DBMS_OUTPUT.PUT_LINE('My lucky number is ' || num); END; Unix Scripting i used sqlplus -s... (7 Replies)
Discussion started by: gohan3376
7 Replies

7. 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

8. 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

9. 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

10. UNIX for Dummies Questions & Answers

calling Oracle procedure from Unix

Does anyone know how to call an Oracle stored procedure from a Unix script? (1 Reply)
Discussion started by: ssmiths001
1 Replies
Login or Register to Ask a Question