in reply to Oracle SQL syntax error (was: I can't see the error?)

It's an Oracle syntax error, not a perl problem, so I feel iffy about giving you any specific answers in this forum. However, as a starting point, you might want to check the syntax of your second $sql_cmd string definition.

Good luck!
scott.