ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Schrader" <tschra...@gmail.com>
Subject Re: # in select statement
Date Tue, 07 Mar 2006 18:53:11 GMT
Hi Henry,

Escape your # with ##.

>> select unique prpsl_## as m_name, prpsl_## as m_value ....

Ted

On 07/03/06, Henry Lu <zhlu@umich.edu> wrote:
> I have a SQL statement:
>
>    <select id="select_drda_list"
>            resultClass="utilmisc.NameValue">
> <![CDATA[
> select unique prpsl_# as m_name, prpsl_# as m_value
> from
> prism_funding
> where prpsl_## is not null
> and prpsl_## not in
> (select proposal_number from training_grant
> where proposal_number is not null)
> order by 1
> ]]>
>    </select>
>
> And I got the following error:
>
> Caused by: com.ibatis.sqlmap.client.SqlMapException: Incorrect in
> line parameter map format (missmatched name=value pairs):
>   as m_name, prpsl_
> Caused by: com.ibatis.common.exception.NestedRuntimeException:
> Error parsing XPath '/sqlMap/select'.
> Cause: com.ibatis.sqlmap.client.SqlMapException:
> Incorrect inline parameter map format (missmatched name=value pairs):
>   as m_name, prpsl_
> Caused by: com.ibatis.sqlmap.client.SqlMapException: Incorrect in
> line parameter map format (missmatched name=value pairs):  as m_name, prpsl_
> at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletPar
>
> How do I fix it?
>
> -Henry
>

Mime
View raw message