Friend of mine is having trouble running an SQL script on a HP server. The hash-bang at the beginning of the script file says:
#!/bin/sh
Then there's a line that starts Oracle SQL Plus with some SQL-commands file as input, like so:
sqlplus userid/password@serverid < sqlcommandfilename.txt
Thing is, in sqlcommandfilename.txt, there are some lines with underscores in them, which apparently messes something up somewhere:
update sometable set somecolumn='PartOne_PartTwo'
After having run this, you'd expect there to be some records where the value of somecolumn is PartOne_PartTwo in the database... But, examination reveals, the rows that are actually created in the DB contain just PartOne!
Any hypotheses as to where this problem stems from? Does the script interpreter somehow get involved, or is it the piping-in of the SQL-command file itself that is somehow interrupted at the underscore? Or, is it not the underscore, but the apostrophes that foul thing up -- are they getting interpreted as "backticks"? (Though I thought that was Perl or something, not the basic [Bourne?] shell.)
[Edit:] It doesn't seem to be in SQL Plus itself, since the exact same statement copied from the script file and pasted into an SQL Plus window *does* insert the correct value of PartOne_PartTwo into somecolumn. That's why we're thinking it has to be something in he piping itself, somehow.
Anywhichway... not being a Unix hacker myself either, I'll be grateful for anything that might help.