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!

Issues with do-while loop of SQL statement result rows in Shell Script

LDGaneshJun 11 2014 — edited Jun 11 2014

Hi,

This question is continuation to my discussion : Need an example to loop with sql statement values in shell script

I have two questions pertaining to using a loop with sql statement in shell script

1. Say, I populate a new variable within this loop. Once the control comes out of the loop, the variable is blank and the saved value is lost.

  What should be done to retain the variable value.

2. Whenever, I use exit 1 (using bourn shell) with in the loop (of sql statement), concurrent program is existing but not with error.

Program stops but it is neither showing in red color or showing the below message in the log file 'Program exited with status 1'

  Appreciate your time and help.

thanks in advance,

Ganesh

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 9 2014
Added on Jun 11 2014
2 comments
638 views