You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by "Thomas Fox (JIRA)" <ji...@apache.org> on 2012/09/27 21:39:08 UTC

[jira] [Closed] (TORQUE-70) Escape Text in DBOracle not correct when using columns of type NVARCHAR2

     [ https://issues.apache.org/jira/browse/TORQUE-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thomas Fox closed TORQUE-70.
----------------------------

    
> Escape Text in DBOracle not correct when using columns of type NVARCHAR2
> ------------------------------------------------------------------------
>
>                 Key: TORQUE-70
>                 URL: https://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, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org