Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Passing Multiple Parameters to SQL Script from a Shell Script

Sreekanth MunagalaJun 28 2011 — edited Jun 29 2011
Hi Friends,

I have SQL script which accepts 6 parameters.
I am calling this from a shell script as shown below:
sqlplus -s  ${ORACLE_ID} @${SQLPATH}KORONT_041.sql ${USER_ID} ${PDC} ${item_number} ${KORDC} ${PDCSET} ${last_Updated_in_hours} 
Out of the six parameters, item_number is not a mandatory parameter.
When i pass all six parameters, there is no issue.
But when i leave item_number blank, i am getting the below error
Enter value for 6: 
User requested Interrupt or EOF detected.
Based on the error, it seems that the NULL values for item_number is ignored and SQL*PLUS is waiting for one more input from user.

How can i overcome this issue?

Regards,
Sreekanth
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 27 2011
Added on Jun 28 2011
6 comments
995 views