Return-Path: Delivered-To: apmail-beehive-user-archive@www.apache.org Received: (qmail 12917 invoked from network); 1 Feb 2006 15:47:14 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 1 Feb 2006 15:47:14 -0000 Received: (qmail 22680 invoked by uid 500); 1 Feb 2006 15:47:11 -0000 Delivered-To: apmail-beehive-user-archive@beehive.apache.org Received: (qmail 22659 invoked by uid 500); 1 Feb 2006 15:47:11 -0000 Mailing-List: contact user-help@beehive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Beehive Users" Delivered-To: mailing list user@beehive.apache.org Received: (qmail 22648 invoked by uid 99); 1 Feb 2006 15:47:11 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2006 07:47:11 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of chad.schoettger@gmail.com designates 66.249.82.200 as permitted sender) Received: from [66.249.82.200] (HELO xproxy.gmail.com) (66.249.82.200) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Feb 2006 07:47:10 -0800 Received: by xproxy.gmail.com with SMTP id h28so194868wxd for ; Wed, 01 Feb 2006 07:46:49 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=l0ycfc8e9NE3vhGUl2y23lZe2steYEITKZNGlGGpIYUDUlAJzYGb3699+brDy12F+aopDSZHsdl+AV9AHePPGgq2oxFavPYDQqIyfxfmZFFu1SC2fHHhFLpHULq6f2Hkm446NU1vqzuoUOh68MBViAXDTgPF0fJicIRQ2bLaS5k= Received: by 10.70.17.13 with SMTP id 13mr10064147wxq; Wed, 01 Feb 2006 07:46:47 -0800 (PST) Received: by 10.70.10.13 with HTTP; Wed, 1 Feb 2006 07:46:47 -0800 (PST) Message-ID: Date: Wed, 1 Feb 2006 08:46:47 -0700 From: Chad Schoettger To: Beehive Users Subject: Re: JDBC Control question In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_5382_10422329.1138808807956" References: X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_5382_10422329.1138808807956 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Madhu, The JDBC control will pass your SQL statement to the JDBC driver. Any vali= d SQL statement can be used to do your queries. If the SQL statement is not valid you will get an SQLException from the JDBC driver. So you should be able to use either of the statments below assuming they provide the functionality you need. Let me know if this doesn't answer you question. - Chad On 2/1/06, Madhusudhan_R_Tera@netnumina.com < Madhusudhan_R_Tera@netnumina.com> wrote: > > Hi > I have a ProjectVO which has ClientVO inside it. And my Project table has > ClientID as foreign key referencing Client(ClientID). > > My question is can i write a query in the control like: > How do i write the query so that it get the clientId into the ClientVO > inside ProjectVO? My question is can i do something like this: > > Select ProjectID, ClientID from Project join Client on Project.ClientID = =3D > Client.ClientID > > or if this doesnt work can I do: > > Select ProjectID, ClientID client.ClientID from Project join Client on > Project.ClientID =3D Client.ClientID. > > assuming that there is a getClient() method declared for client which is > an instance of ClientVO (I am trying to use the alias in the query for > ClientID) > > Please help. > > Thanks > Madhu > ------=_Part_5382_10422329.1138808807956--