Today we ran into the following issue. When Oracle encounters a hint as indicated by a /*+ comment with an embedded – indicating an embedded comment on the hint,
then the package will compile ok, but at execution time we get an Oracle error: “ORA-00921: unexpected end of SQL command”
It’s kind of nasty of Oracle to compile without warning, yet throw the exception at execution time…
Since we’re on Oracle 9, there’s no point in filing this issue with Oracle.
So, how big an issue would it be to have the formatter issue a warning?
Working your way back from the Oracle error to find the exact error cause has taken us quite some time
When executing the very same statment interactively, using F9, it does execute ok.
Would you regard this as a reasonable request? Any alternatives for preventing this type of error?
I really would like to have early detection of this error, as it may remain lurking in code
that is rarely executed; only to raise its ugly head when the code is actually executed.
Oh - the reason we’re putting in comments is, this program is pretty hefty (some 60K lines in 12 packages)
when looking at an issue, using the session monitor, we’d like to have an identifyig comment in the query.
We found that only the hint is displayed in the session manager, not ‘normal’ comments. So we moved
the identifiyng comments inside the hint, then got into the ORA-00921 issue)