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 "Hemant.Kamatgi" <He...@target.com> on 2008/01/30 06:51:53 UTC

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




Re: Problem with dynamic sql

Posted by Jeff Butler <je...@gmail.com>.
What exception?

Jeff Butler

On Jan 29, 2008 11:51 PM, Hemant. Kamatgi <He...@target.com> wrote:

>  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
>
>
>
>
>
>
>