Windows Oracle Data Access Components (MOSC)

MOSC Banner

single quote as first character fails in compare

edited Oct 13, 2011 12:57AM in Windows Oracle Data Access Components (MOSC) 10 commentsAnswered ✓
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

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center