It's highly likely that you didn't search the forums for '
sqlplus' .
Whilst this may not answer all your questions, it might put you on the right path.
How to check sqlplus command is successfull or not in HP UX?
Trying to perform SQL in the way you've shown is really hard to manage over time.
In future, make use of the search feature in these forums.
You questions is more than likely to have been asked before in the past.
Cheers,
Cameron
