single quote as first character fails in compare
I got a very strange problem. If the first character in a string isa single quote I get a syntax error, but that only happens in a =
compare and not in sqlplus.
This is what happens:
SELECT * FROM dual WHERE dummy ='''aaaa'
DBArecordSet.OpenSet: Error from: 'OraOLEDB' 0x80040E14 (-2147217900)
ORA-00933: SQL command not properly ended Native: 933 (help=.0)
This goes wrong in an oledb and also in an ODBC connection.
The following does work:
SELECT '''a''' FROM dual
SELECT * FROM dual WHERE dummy like '''a'
SELECT * FROM dual WHERE dummy =N'''aaaa'
I tried this with Oracle 11.2 and Oracle 10.2 server and Oracle 11.2
compare and not in sqlplus.
This is what happens:
SELECT * FROM dual WHERE dummy ='''aaaa'
DBArecordSet.OpenSet: Error from: 'OraOLEDB' 0x80040E14 (-2147217900)
ORA-00933: SQL command not properly ended Native: 933 (help=.0)
This goes wrong in an oledb and also in an ODBC connection.
The following does work:
SELECT '''a''' FROM dual
SELECT * FROM dual WHERE dummy like '''a'
SELECT * FROM dual WHERE dummy =N'''aaaa'
I tried this with Oracle 11.2 and Oracle 10.2 server and Oracle 11.2
0