[This topic is migrated from our old forums. The original author name has been removed]
I don't know when this started. It seems DBVis (v9.19) has an issue (for me) with single quotes in comments. It throws this error: "ORA-00911: invalid character". These are not "smart quotes".
I realize this is coming from Oracle, but it must be the way the query is sent to the database. It didn't always used to happen. I went through the "Tool" properties and couldn't find the reason. I don't recall making any strange changes.
In any case, there are three statements below, each preceded by a type of comment : multiple lines in a multi-line comment, single line in a single-line comment, and single line in a multi-line comment (syntax). All of thee "invalid character" issues resolve if I remove the single quote in the comment preceding the sql statement:
/*
----------------------------------------------------------------------
Whats the problem with using single-quotes in a multi-line comment?
----------------------------------------------------------------------
*/
SELECT
CURRENT_DATE CURRDATE
, SYSDATE SYS_DATE
, USER EMPLOYEE
, LAST_DAY(CURRENT_DATE) EOMONTH
FROM DUAL;
-- Here's another one-line with single quote
SELECT
OWNER
, COUNT(TABLE_NAME) CNT
FROM ALL_TABLES
WHERE OWNER != 'SYS'
GROUP BY OWNER
ORDER BY OWNER;
/* Something's wrong here wth this one-line multi-line comment */
SELECT
'A' alpha
, 'B' beta
, 'E' epsilon
FROM DUAL;
Thanks,
Ray
[This reply is migrated from our old forums. The original author name has been removed]
Re: Single Quote in Comments - Error
Your forum software changed my single-line comment from two dashes to what looks like a bullet. Just imagine it's two dashes like I typed in.
Ray
Roger Bjärevall
said
over 9 years ago
[This reply is migrated from our old forums.]
Re: Single Quote in Comments - Error
Ray,
To fix this make sure Strip Comments when Executing is checked in the SQL Commander menu.
An alternative is to upgrade to 9.2.5 which contains a fix which makes it work independent if Strip Comments is checked or unchecked.
Regards
Roger
a
anonymous
said
over 9 years ago
[This reply is migrated from our old forums. The original author name has been removed]
Re: Single Quote in Comments - Error
Roger you always come to the rescue. That fixed it. Thanks!
Ray
anonymous