If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > problems in variable passing from shell to procedure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-30-03, 01:24
gracedan gracedan is offline
Registered User
 
Join Date: Oct 2003
Posts: 1
Question problems in variable passing from shell to procedure

hi,
i need to passing the variable from shell script to procedure,but it does not work.the following are my shell and procedure.
job(){
sqlplus user/password@orcl <<EOF
exec count_prize_proc($1,$2,$3)
EOF
}
if [ $# -eq 3 ] ;then
job
else
echo " EXAMPLE£ºjobstart.sh 155 200 210 "
fi

create or replace procedure count_prize_proc
(t_play_code in varchar2,
t_begin_term in varchar2,
t_end_term in varchar2 )
IS

---------------------------------------------------------
call_proc.sh 005 100 200
write win_prize Program
SQL*Plus: Release 8.1.7.0.0 - Production on Thu Oct 30 13:59:02 2003

(c) Copyright 2000 Oracle Corporation. All rights reserved.

Connected to:
Oracle8i Enterprise Edition Release 8.1.7.0.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.0.0 - 64bit Production

SQL> BEGIN count_prize_proc(,,); END;
*
ERROR at line 1:
ORA-06550: line 1, column 24:
PLS-00103: Encountered the symbol "," when expecting one of the following:
( ) - + mod not null others <an identifier>
<a double-quoted delimited-identifier> <a bind variable>
table avg count current exists max min prior sql stddev sum
variance execute multiset the both leading trailing forall
year month DAY_ HOUR_ MINUTE_ second TIMEZONE_HOUR_
TIMEZONE_MINUTE_ time timestamp interval date
<a string literal with character set specification>
<a number> <a single-quoted SQL string>

SQL> Disconnected from Oracle8i Enterprise Edition Release 8.1.7.0.0 - 64bit Production
With the Partitioning option
JServer Release 8.1.7.0.0 - 64bit Production
-------------------------------------------------------------
then i modified my shell
exec count_prize_proc("$1","$2","$3")

----------------------------------------------------------
SQL> ERROR:
ORA-01741: illegal zero-length identifier

Any ideas/suggestions?
thanks advance

grace
Reply With Quote
  #2 (permalink)  
Old 11-21-03, 03:58
satish_ct satish_ct is offline
Registered User
 
Join Date: Nov 2003
Location: Bangalore, INDIA
Posts: 333
Thumbs up

Hi,

ORA-01741: illegal zero-length identifier is raised because, an attempt was made to use two double quotes ("") as an identifier.

An identifier must be at least one character long. Action: Insert at least one character between the double quotes in the identifier. If a blank identifier is required, specify a blank space between the double quotes (" ").
__________________
SATHISH .
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On