ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Leucht, Axel" <Axel.Leu...@prodv.de>
Subject AW: Problem with dynamic sql
Date Wed, 30 Jan 2008 09:23:09 GMT
select ptrn_i,ptrn_n from $schema$.eprs_ptrn 

<dynamic prepend="where">

    <isNotNull property="status">ptrn_statc_c = #status#</isNotNull>



-----Urspr√ľngliche Nachricht-----
Von: Hemant.Kamatgi [mailto:Hemant.Kamatgi@target.com]
Gesendet: Mittwoch, 30. Januar 2008 06:52
An: user-java@ibatis.apache.org
Betreff: Problem with dynamic sql

Hi All,


I'm getting an exception when trying to execute a dynamic sql in iBATIS. The query is below:


      <select id="selectPatterns" parameterClass="searchCriteriaVO" resultMap="patternAttributeResult">

            select ptrn_i,ptrn_n from ${schema}.eprs_ptrn <isNotNull prepend=" where "
property="status"> ptrn_statc_c = #status# </isNotNull>


The database is db2. Please lemme know what I'm doing wrong in the sql.







View raw message