ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ayan.x.afr...@jpmchase.com
Subject Dynamic where clause problem
Date Wed, 18 Oct 2006 17:56:11 GMT
I am currently depending on one statement to handle returning all rows 
from a table, as well as returning only some rows based on some keys. 

The query is as below. But everytime I try to execute this, I get:

UncategorizedSQLException: SqlMapClient operation; uncategorized 
SQLException for SQL []; SQL state [37000]; error code [102]; --- The 
error occurred while applying a parameter map. --- Check the 
AccountMappings.getById-InlineParameterMap. --- Check the statement (query 
failed). --- Cause: java.sql.SQLException: Incorrect syntax near 
'BUS_SYS_CATG_CD'. ; nested exception is 
com.ibatis.common.jdbc.exception.NestedSQLException: --- The error 
occurred while applying a parameter map. --- Check the 
AccountMappings.getById-InlineParameterMap. --- Check the statement (query 
failed). --- Cause: java.sql.SQLException: Incorrect syntax near 
'BUS_SYS_CATG_CD'. 



    <select id="getById" resultMap="STG1_ACCOUNT_SERVICE_MAPPINGObject" 
parameterClass="accountServiceSearchObject">
                SELECT  BUS_SYS_CATG_CD as BUS_SYS_CATG_CD,
                        ACC_SERV_NM     as ACC_SERV_NM,
                        isnull(ACCT_PRD_ID,-1)  as ACCT_PRD_ID
                FROM STG1_ACCOUNT_SERVICE_MAPPING
                <dynamic prepend="WHERE">
                        <isNotEmpty property="accServName">
                                ACC_SERV_NM = #accServName#
                        </isNotEmpty>
                        <isNotEmpty prepend=" AND " property="busSysCode">
                                BUS_SYS_CATG_CD = #busSysCode#
                        </isNotEmpty>
                </dynamic>
    </select> 

Any idea what is going on?
Thanks,
Ayan








"Clinton Begin" <clinton.begin@gmail.com> 
10/18/2006 10:47 AM
Please respond to
user-java@ibatis.apache.org


To
user-java@ibatis.apache.org, Konus <konus@i-c.com.ua>
cc

Subject
Re: IBATIS + AJA X.






No....

I haven't had time.  But I'm speaking at NFJS Toronto, where I'll need to 
again present the AJAX/iBATIS demo.  So I should have time between 
sessions to improve the JavaScript/iBATIS bridge servlet to make it nicer 
to work with. 

Any suggestions for a sample app?

Cheers,
Clinton

On 10/18/06, Rogov Andrey <konus@i-c.com.ua > wrote:
Hi Clinton,
Have you already prepared the example of IBATIS + AJAX?

--
regards,
Andrey.                         mailto:konus@i-c.com.ua





-----------------------------------------
This transmission may contain information that is privileged,
confidential, legally privileged, and/or exempt from disclosure
under applicable law.  If you are not the intended recipient, you
are hereby notified that any disclosure, copying, distribution, or
use of the information contained herein (including any reliance
thereon) is STRICTLY PROHIBITED.  Although this transmission and
any attachments are believed to be free of any virus or other
defect that might affect any computer system into which it is
received and opened, it is the responsibility of the recipient to
ensure that it is virus free and no responsibility is accepted by
JPMorgan Chase & Co., its subsidiaries and affiliates, as
applicable, for any loss or damage arising in any way from its use.
If you received this transmission in error, please immediately
contact the sender and destroy the material in its entirety,
whether in electronic or hard copy format. Thank you.

Mime
View raw message