Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 70946 invoked from network); 7 Aug 2009 12:35:08 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 7 Aug 2009 12:35:08 -0000 Received: (qmail 50815 invoked by uid 500); 7 Aug 2009 12:35:15 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 50769 invoked by uid 500); 7 Aug 2009 12:35:15 -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 50758 invoked by uid 99); 7 Aug 2009 12:35:15 -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:35:15 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [173.15.87.35] (HELO dbrack01.segel.com) (173.15.87.35) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 07 Aug 2009 12:35:06 +0000 Received: from Desktop02 (173-15-87-33-Illinois.hfc.comcastbusiness.net [173.15.87.33]) by dbrack01.segel.com (Postfix - We shoot spammers on site.) with ESMTP id 97D515DA75 for ; Fri, 7 Aug 2009 07:41:35 -0500 (CDT) Reply-To: From: Sender: "Michael Segel" To: "'Derby Discussion'" Subject: RE: SQL Syntax issue Date: Fri, 7 Aug 2009 07:35:10 -0500 Organization: MSCC MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_002A_01CA1731.98654350" X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3350 In-Reply-To: <29a7a5a10908070506v407c1a0cr7897d4b08350bc74@mail.gmail.com> Thread-Index: AcoXWIIOf1EpvPGPRvGrAWL7APPdnAAArq5w Message-Id: <20090807124135.97D515DA75@dbrack01.segel.com> X-Virus-Checked: Checked by ClamAV on apache.org This is a multi-part message in MIME format. ------=_NextPart_000_002A_01CA1731.98654350 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Why do you need two tables in your update? Its not really a nested query but an Update statement where you use a select statement to help qualify the Update. See the standard SQL syntax on this. _____ From: Ravinder Reddy [mailto:ravinder.pandiri@gmail.com] Sent: Friday, August 07, 2009 7:06 AM To: Derby Discussion Subject: Re: SQL Syntax issue Hi, I think , you can't do that. Instead use nested queries (I am not sure Derby supports nested queries though). On Fri, Aug 7, 2009 at 5:07 PM, Priyanka Karnawat wrote: Can we use 2 or more tables in UPDATE clause? eg. UPDATE T1, T2 SET T1.name = 'abc' WHERE T1.id = T2.id -- Ravinder Reddy ------=_NextPart_000_002A_01CA1731.98654350 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Why do you need two tables in your = update?

 

Its not really a nested query but = an Update statement where you use a select statement to help qualify the = Update.

 

See the standard SQL syntax on = this.

 


From: = Ravinder Reddy [mailto:ravinder.pandiri@gmail.com]
Sent: Friday, August 07, = 2009 7:06 AM
To: Derby Discussion
Subject: Re: SQL Syntax = issue

 

Hi,

 

I think , you can't do that.

Instead use nested queries (I am not sure Derby supports nested queries = though).

 

 

On Fri, Aug 7, 2009 at 5:07 PM, Priyanka Karnawat <priyanka@sungraceinfotech= .co.in> wrote:

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




--
Ravinder Reddy

------=_NextPart_000_002A_01CA1731.98654350--