SQLPlus and Unix scripting with passing variables.
I have a Unix (Solaris) script that I am trying to embed a SQLPlus script in it as I am trying to receive values from my Oracle database and write them into script variables to be used elsewhere in my script. However, I am getting an error when it calls the "HERE" file which contains the SQLPlus script. I'm a newbie when it comes to Unix scripting and SQLPlus, but how can I call SQLPlus from within another script... I get the feeling that I can't use the "HERE" file method as an embedded script within a larger script.
So is there a way to query Oracle from within another script and save the results to variables? Or am I missing something?
Any advice would be greatly appreciated and I could post an example if that would help to clarify.