Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 71798 invoked from network); 29 Jan 2010 12:16:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 29 Jan 2010 12:16:40 -0000 Received: (qmail 41676 invoked by uid 500); 29 Jan 2010 12:16:39 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 41642 invoked by uid 500); 29 Jan 2010 12:16:39 -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 41634 invoked by uid 99); 29 Jan 2010 12:16:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jan 2010 12:16:39 +0000 X-ASF-Spam-Status: No, hits=1.2 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [91.199.21.18] (HELO mxa.xchangemail.de) (91.199.21.18) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Jan 2010 12:16:31 +0000 Received: from VAVP1E1A.vavp0m.de (10.40.201.2) by mxb.xchangemail.de (10.41.8.202) with Microsoft SMTP Server (TLS) id 8.1.393.1; Fri, 29 Jan 2010 13:16:04 +0100 Received: from VAVP0E7A.vavp0m.de ([10.46.1.70]) by VAVP1E1A.vavp0m.de ([10.41.0.27]) with mapi; Fri, 29 Jan 2010 13:16:10 +0100 From: Stephen Friedrich To: "user-java@ibatis.apache.org" Date: Fri, 29 Jan 2010 13:16:03 +0100 Subject: AW: Writing subqueries Thread-Topic: Writing subqueries Thread-Index: Acqg276Rldunl+ncSGivPgq+pfP4hgAAKx1A Message-ID: <60454457CBDFBD4DB30D4F4A5B193DED028B0C7A5E@VAVP0E7A.vavp0m.de> References: <1264579868.4b5ff51ca5c8b@imp.free.fr> <4B62CF7C.70203@free.fr> In-Reply-To: <4B62CF7C.70203@free.fr> Accept-Language: en-US, de-DE Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US, de-DE Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org The statement you gave is a single statement. iBatis doesn't care (or know) how many subqueries it contains. You can simply use a single tag: INSERT into table1 (ville, nom, datn) SELECT l.ville, l.nom, v.datn from mtab l, dpart b, table3 v where b.nom=3Dl.nom and (b.nom,v.datn) not in (SELECT x.nom,x.datn from table1 x) I recommend just giving ibatis a testdrive and actually playing with it a l= ittle. -----Urspr=FCngliche Nachricht----- Von: F. TRAORE [mailto:fran.cois@free.fr]=20 Gesendet: Freitag, 29. Januar 2010 13:07 An: user-java@ibatis.apache.org Betreff: Re: Writing subqueries > Thats just an update query. I'm not sure what the difficulty you have is? > =20 Just an update query ? Two select into one insert ? Excuse me for=20 disturbing you if you're an iBatis expert and please don't lose your=20 time more longer... As I said I'm new on iBatis and just want to know how to to embed a=20 statement within another. Thanks for any example. --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-java-unsubscribe@ibatis.apache.org For additional commands, e-mail: user-java-help@ibatis.apache.org