Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 72177 invoked from network); 7 Aug 2009 12:40:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Aug 2009 12:40:59 -0000 Received: (qmail 57289 invoked by uid 500); 7 Aug 2009 12:41:06 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 57219 invoked by uid 500); 7 Aug 2009 12:41:06 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 57209 invoked by uid 99); 7 Aug 2009 12:41:06 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 12:41:06 +0000 X-ASF-Spam-Status: No, hits=-1.8 required=10.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of kaparame@cisco.com designates 171.71.176.71 as permitted sender) Received: from [171.71.176.71] (HELO sj-iport-2.cisco.com) (171.71.176.71) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 12:40:54 +0000 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ArsEAL+9e0qrR7PD/2dsb2JhbACCKC2ISKt3iCuQEwWEFg X-IronPort-AV: E=Sophos;i="4.43,341,1246838400"; d="scan'208,217";a="193514279" Received: from sj-dkim-3.cisco.com ([171.71.179.195]) by sj-iport-2.cisco.com with ESMTP; 07 Aug 2009 12:40:33 +0000 Received: from sj-core-2.cisco.com (sj-core-2.cisco.com [171.71.177.254]) by sj-dkim-3.cisco.com (8.12.11/8.12.11) with ESMTP id n77CeXaQ005635; Fri, 7 Aug 2009 05:40:33 -0700 Received: from sj-webmail-15.cisco.com (sj-webmail-15.cisco.com [171.70.113.20]) by sj-core-2.cisco.com (8.13.8/8.14.3) with ESMTP id n77CeX6V006996; Fri, 7 Aug 2009 12:40:33 GMT Received: from sj-webmail-15.cisco.com (localhost.localdomain [127.0.0.1]) by sj-webmail-15.cisco.com (8.13.1/8.13.1) with ESMTP id n77CeWZK020858; Fri, 7 Aug 2009 05:40:32 -0700 Received: from sj-webmail-15.cisco.com (root@localhost) by sj-webmail-15.cisco.com (8.13.1/8.13.1/Submit) with ESMTP id n77CeWo9020847; Fri, 7 Aug 2009 05:40:32 -0700 Received: from kaparamewxp ( [10.77.6.57]) by sj-webmail-15.cisco.com (Scalix SMTP Relay 10.0.5.3) via ESMTP; Fri, 07 Aug 2009 05:40:31 -0700 (PDT) Date: Fri, 7 Aug 2009 18:10:29 +0530 From: Kamesh Parameswaran To: "'Derby Discussion'" , Message-ID: <009e01ca175c$405801e0$39064d0a@cisco.com> In-Reply-To: <313284540908070437o16ca96ach27b9b909e1ebca82@mail.gmail.com> References: <313284540908070437o16ca96ach27b9b909e1ebca82@mail.gmail.com> Subject: RE: SQL Syntax issue x-scalix-Hops: 1 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcoXVQlZVeIQyBUKTPaaafNuLC3JoAABr60w X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_009F_01CA178A.5A14F8D0" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=2115; t=1249648833; x=1250512833; c=relaxed/simple; s=sjdkim3002; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=kaparame@cisco.com; z=From:=20Kamesh=20Parameswaran=20 |Subject:=20RE=3A=20SQL=20Syntax=20issue |Sender:=20; bh=GYK4rsYrLO0hChbabYZlKc9julS6P96Pl2AssfxehnQ=; b=aEFnzBlIgCi8OITL/NA815WRlNhjF3yV+cKlP2pM5goHraDMHsAg+udVcE BSteUOME0meKDJpW8MD81r7D96x58BFz/shdk2jrkQvHlYRA4RFgHgYpha9B IT+MQTNB9o; Authentication-Results: sj-dkim-3; header.From=kaparame@cisco.com; dkim=pass ( sig from cisco.com/sjdkim3002 verified; ); X-Virus-Checked: Checked by ClamAV on apache.org ------=_NextPart_000_009F_01CA178A.5A14F8D0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline I guess you need a stored procedure to update multiple tables. The statements can be wrapped within a transaction. If possible send me your use case. I'll see how it can be done ~Kamesh _____ From: Priyanka Karnawat [mailto:priyanka@sungraceinfotech.co.in] Sent: Friday, August 07, 2009 5:08 PM To: derby-user@db.apache.org Subject: SQL Syntax issue Can we use 2 or more tables in UPDATE clause? eg. UPDATE T1, T2 SET T1.name = 'abc' WHERE T1.id = T2.id ------=_NextPart_000_009F_01CA178A.5A14F8D0 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
<= SPAN=20 class=3D066103712-07082009>I guess you need a stored procedure to update m= ultiple=20 tables. The statements can be wrapped within a transaction. If possible s= end me=20 your use case. I'll see how it can be done
<= SPAN=20 class=3D066103712-07082009> 
<= SPAN=20 class=3D066103712-07082009>~Kamesh


From: Priyanka Karnawat=20 [mailto:priyanka@sungraceinfotech.co.in]
Sent: Friday, August 0= 7,=20 2009 5:08 PM
To: derby-user@db.apache.org
Subject: SQ= L=20 Syntax issue

Can we use 2 or more tables in UPDATE clause?
eg. UPDATE T1= ,=20 T2
SET T1.name =3D 'abc'
WHERE T1.id =3D T2.id
------=_NextPart_000_009F_01CA178A.5A14F8D0--