try:
select ptrn_i,ptrn_n from $schema$.eprs_ptrn 

<dynamic prepend="where">

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

</dynamic> 

/Axel 

-----Ursprüngliche Nachricht-----
Von: Hemant.Kamatgi [mailto:[EMAIL PROTECTED]
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>

      </select>

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

 

Regards

Hemant

 

 

 

Reply via email to