Escape Text in DBOracle not correct when using columns of type NVARCHAR2
------------------------------------------------------------------------
Key: TORQUE-70
URL: http://issues.apache.org/jira/browse/TORQUE-70
Project: Torque
Issue Type: Bug
Components: Runtime
Affects Versions: 3.3
Environment: Oracle 9
Reporter: Tobias Hilka
The default escape string for DBOracle is '\'. This works fine for VARCHAR2
columns. This statement is correct in these cases:
SELECT * FROM MYTABLE WHERE MYCOLUMN LIKE 'TEST\_%' ESCAPE '\'
This escape string does not work for columns of type NVARCHAR2. Using this
escape character brings up the following error:
ORA-01425: escape character must be character string of length 1
In case of columns of type NVARCHAR2 the correct escape character is N'\'. So
the query above has to be written as follows:
SELECT * FROM MYTABLE WHERE MYCOLUMN LIKE 'TEST\_%' ESCAPE N'\'
We need some kind of mechanism to switch the escape string depending on the
column used in the like statement. The problem is that at this point of
execution, we don't have column objects but just plain strings representing the
column names. (SQLExpression.buildLike(...))
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]