You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by Ma...@bafin.de on 2009/06/25 12:56:48 UTC
Issue with special character
Hi,
in our DB2 database, some columns have a # in their name, e.g. ID#
This conflicts now with the iBatis placeholder character #, e.g.
select * from table where ID# = #myId#
does not work.
Also the resultMap mapping
<resultMap id="TableResult" class="Table">
<result property="id" column="ID#" />
...
</resultMap>
Does not work.
Does anybody know, how to escape # in iBatis?
Thanks a lot
Markus
AW: Issue with special character
Posted by Ma...@bafin.de.
Jeff,
Great, this works.
Thanks !!
Markus
-----Ursprüngliche Nachricht-----
Von: Jeff Butler [mailto:jeffgbutler@gmail.com]
Gesendet: Donnerstag, 25. Juni 2009 15:00
An: user-java@ibatis.apache.org
Betreff: Re: Issue with special character
Escape the column name by doubling the hash mark:
Select id## from ...
Jeff Butler
On 6/25/09, Markus.Kopp@bafin.de <Ma...@bafin.de> wrote:
> Thanks for the hint, but
> select * from ZAHLINST.AGENTEN where <![CDATA[ID#]]> = #id# does not
> work
>
> I get the following exception:
> Caused by: com.ibatis.sqlmap.client.SqlMapException: Incorrect inline
> parameter map format (missmatched name=value pairs): =
>
> Markus
>
> ________________________________
>
> Von: Nicholoz Koka Kiknadze [mailto:kiknadze@gmail.com]
> Gesendet: Donnerstag, 25. Juni 2009 13:06
> An: user-java@ibatis.apache.org
> Betreff: Re: Issue with special character
>
>
> Have you tried enclosing field names containing # with CDATA ? Maybe
> it will help...
>
>
>
>
> On Thu, Jun 25, 2009 at 2:56 PM, <Ma...@bafin.de> wrote:
>
>
> Hi,
>
> in our DB2 database, some columns have a # in their name, e.g.
> ID#
> This conflicts now with the iBatis placeholder character #, e.g.
>
>
> select * from table where ID# = #myId#
>
> does not work.
>
> Also the resultMap mapping
> <resultMap id="TableResult" class="Table">
> <result property="id" column="ID#" />
> ...
> </resultMap>
>
>
> Does not work.
>
> Does anybody know, how to escape # in iBatis?
>
> Thanks a lot
> Markus
>
>
>
--
Sent from my mobile device
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org
Re: Issue with special character
Posted by Jeff Butler <je...@gmail.com>.
Escape the column name by doubling the hash mark:
Select id## from ...
Jeff Butler
On 6/25/09, Markus.Kopp@bafin.de <Ma...@bafin.de> wrote:
> Thanks for the hint, but
> select * from ZAHLINST.AGENTEN where <![CDATA[ID#]]> = #id#
> does not work
>
> I get the following exception:
> Caused by: com.ibatis.sqlmap.client.SqlMapException: Incorrect inline
> parameter map format (missmatched name=value pairs): =
>
> Markus
>
> ________________________________
>
> Von: Nicholoz Koka Kiknadze [mailto:kiknadze@gmail.com]
> Gesendet: Donnerstag, 25. Juni 2009 13:06
> An: user-java@ibatis.apache.org
> Betreff: Re: Issue with special character
>
>
> Have you tried enclosing field names containing # with CDATA ? Maybe it
> will help...
>
>
>
>
> On Thu, Jun 25, 2009 at 2:56 PM, <Ma...@bafin.de> wrote:
>
>
> Hi,
>
> in our DB2 database, some columns have a # in their name, e.g.
> ID#
> This conflicts now with the iBatis placeholder character #, e.g.
>
>
> select * from table where ID# = #myId#
>
> does not work.
>
> Also the resultMap mapping
> <resultMap id="TableResult" class="Table">
> <result property="id" column="ID#" />
> ...
> </resultMap>
>
>
> Does not work.
>
> Does anybody know, how to escape # in iBatis?
>
> Thanks a lot
> Markus
>
>
>
--
Sent from my mobile device
---------------------------------------------------------------------
To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org
For additional commands, e-mail: user-java-help@ibatis.apache.org
AW: Issue with special character
Posted by Ma...@bafin.de.
Thanks for the hint, but
select * from ZAHLINST.AGENTEN where <![CDATA[ID#]]> = #id#
does not work
I get the following exception:
Caused by: com.ibatis.sqlmap.client.SqlMapException: Incorrect inline
parameter map format (missmatched name=value pairs): =
Markus
________________________________
Von: Nicholoz Koka Kiknadze [mailto:kiknadze@gmail.com]
Gesendet: Donnerstag, 25. Juni 2009 13:06
An: user-java@ibatis.apache.org
Betreff: Re: Issue with special character
Have you tried enclosing field names containing # with CDATA ? Maybe it
will help...
On Thu, Jun 25, 2009 at 2:56 PM, <Ma...@bafin.de> wrote:
Hi,
in our DB2 database, some columns have a # in their name, e.g.
ID#
This conflicts now with the iBatis placeholder character #, e.g.
select * from table where ID# = #myId#
does not work.
Also the resultMap mapping
<resultMap id="TableResult" class="Table">
<result property="id" column="ID#" />
...
</resultMap>
Does not work.
Does anybody know, how to escape # in iBatis?
Thanks a lot
Markus
Re: Issue with special character
Posted by Nicholoz Koka Kiknadze <ki...@gmail.com>.
Have you tried enclosing field names containing # with *CDATA *? Maybe it
will help...
On Thu, Jun 25, 2009 at 2:56 PM, <Ma...@bafin.de> wrote:
> Hi,
>
> in our DB2 database, some columns have a # in their name, e.g. ID#
> This conflicts now with the iBatis placeholder character #, e.g.
>
> select * from table where ID# = #myId#
>
> does not work.
>
> Also the resultMap mapping
> <resultMap id="TableResult" class="Table">
> <result property="id" column="ID#" />
> …
> </resultMap>
>
> Does not work.
>
> Does anybody know, how to escape # in iBatis?
>
> Thanks a lot
> Markus
>