[NTLUG:Discuss] OT: sql embedded in shell script (sh) passing parameters
fredjame
fredjame at concentric.net
Fri Sep 5 07:31:59 CDT 2003
I am not all together sure what is happening here, and any questions or
advise would be most welcomed.
I have a bit of sql (sqlplus as a matter of fact) embedded in a shell
script, such as shown below. The sql works fine by itself, and worked
fine until we added the "AND" phrase shown. The issue seems to be that
the $InvType is character, and should be enclosed in "single quotes"
(example: AND ih.inv_type = 'REB'), but nothing I do seems to work. I
don't want to muddy the water with a lot of my own conjecture, so I'll
stop right there, and repeat the offer of more details upon request.
Thank you in advance for any help you may be able to offer.
<Code Snippet>
sqlplus username/password at sid << EOF
(omitted for brevity)
AND ih.inv_type = $InvType
/
exit
EOF
<\Code Snippet>
--
...small is beautiful.
More information about the Discuss
mailing list