Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 31012 invoked from network); 7 Feb 2006 06:33:45 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Feb 2006 06:33:45 -0000 Received: (qmail 77831 invoked by uid 500); 7 Feb 2006 06:33:43 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 77814 invoked by uid 500); 7 Feb 2006 06:33:43 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 77802 invoked by uid 99); 7 Feb 2006 06:33:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 22:33:42 -0800 X-ASF-Spam-Status: No, hits=0.6 required=10.0 tests=HTML_MESSAGE,NO_REAL_NAME,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of stevenlou@gmail.com designates 64.233.162.195 as permitted sender) Received: from [64.233.162.195] (HELO zproxy.gmail.com) (64.233.162.195) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2006 22:33:42 -0800 Received: by zproxy.gmail.com with SMTP id x7so1248417nzc for ; Mon, 06 Feb 2006 22:33:21 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:mime-version:content-type; b=t2DrR3ivL9ThQJILnAZeXWDu2EFjUjje+Zmy12LQukd6Jqjtxf5Gxo5zZ+mL7noiwqIIHL6wGOtz7UDghdaJlnRNU1i3/MWkqf5SFXqhqt8vBBp4wUQs2i3wSwatT0BVO2exUQWgzf60iLUKhVCcLPQvAOwvDXChz5aaKG2f2JY= Received: by 10.36.148.13 with SMTP id v13mr4774826nzd; Mon, 06 Feb 2006 22:33:21 -0800 (PST) Received: by 10.36.146.5 with HTTP; Mon, 6 Feb 2006 22:33:21 -0800 (PST) Message-ID: <7dcc9ba80602062233g68b04a0cif2d383ae9ccfa46c@mail.gmail.com> Date: Tue, 7 Feb 2006 14:33:21 +0800 From: To: user-java@ibatis.apache.org Subject: dynamic insert question MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5409_6517155.1139294001283" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_5409_6517155.1139294001283 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Dear all, I want insert the table via one dynamic select, the "PartVO" is one object and it has "family" attribute, and it's type is "String", #domain[ ]# But it cause following error,seems the select can't get string value for "family" column, but in the "PartVO" object, I already defined its type is "String", and others are working(I use DB2 database): Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQL0408N A value is not compatible with the data type of its assignment target. Target name is "FAMILY". SQLSTATE=3D42821 How can I make this function working? Thanks so much for your warm-heated help! Steven ------=_Part_5409_6517155.1139294001283 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
Dear all,
 
I want insert the table via one dynamic select, the "PartVO"= is one object and it has "family" attribute, and it's type is &q= uot;String",
 
  <insert id=3D"insertFamily" parameterClass=3D"= ;PartVO">
    <![CDATA[
  insert into = cto.partfamily (family,partnum,parttype,active_flag) select $family$,partnu= m,parttype,'N' from cto.partinfo where partnum in
     ]]>
 <iterate = property=3D"domain" open=3D"(" close=3D")" co= njunction=3D",">
     #domain[ ]#
&n= bsp;</iterate>
  </insert>
 
But it cause following error,seems the select can't get string value f= or "family" column, but in the "PartVO" object, I alrea= dy defined its type is "String", and others are working(I use DB2= database):
Caused by: COM.ibm.db2.jdbc.DB2Exception: [IBM][CLI Driver][DB2/NT] SQ= L0408N  A value is not compatible with the data type of its assignment= target.  Target name is "FAMILY".  SQLSTATE=3D42821 
How can I make this function working?
 
Thanks so much for your warm-heated help!
 
Steven
------=_Part_5409_6517155.1139294001283--