From derby-user-return-12423-apmail-db-derby-user-archive=db.apache.org@db.apache.org Fri Mar 12 14:33:13 2010 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 98843 invoked from network); 12 Mar 2010 14:33:13 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 12 Mar 2010 14:33:13 -0000 Received: (qmail 92156 invoked by uid 500); 12 Mar 2010 14:32:36 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 92137 invoked by uid 500); 12 Mar 2010 14:32:36 -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 92130 invoked by uid 99); 12 Mar 2010 14:32:36 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Mar 2010 14:32:36 +0000 X-ASF-Spam-Status: No, hits=1.0 required=10.0 tests=KHOP_SC_TOP_CIDR8,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of bbdl21548@blueyonder.co.uk designates 195.188.213.5 as permitted sender) Received: from [195.188.213.5] (HELO smtp-out2.blueyonder.co.uk) (195.188.213.5) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Mar 2010 14:32:32 +0000 Received: from [172.23.170.144] (helo=anti-virus03-07) by smtp-out2.blueyonder.co.uk with smtp (Exim 4.52) id 1Nq5uN-0005gS-Cg for derby-user@db.apache.org; Fri, 12 Mar 2010 14:32:11 +0000 Received: from [92.237.59.138] (helo=atlantis) by asmtp-out5.blueyonder.co.uk with smtp (Exim 4.52) id 1Nq5uI-0005VW-Hf for derby-user@db.apache.org; Fri, 12 Mar 2010 14:32:06 +0000 Message-ID: <56574B8FF24F42E5B9E1F8B8BD629A02@atlantis> From: "Jasvinder S. Bahra" To: "Derby Discussion" References: <58C9501833EA44618C0651C5FA9FF878@atlantis> <4B97D370.5030401@sun.com> <49EF399C79174BF099417BFABBCB929B@atlantis> <4B98F41F.9090605@sun.com> <6E683384372A46C1BF46A0096B35994D@atlantis> <4B9A4B57.50208@sun.com> Subject: Re: Converting a value held in a VARCHAR column into an INTEGER Date: Fri, 12 Mar 2010 14:32:09 -0000 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5843 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5579 >>> The advantage of this approach is that you can put a useful index on >>> integerPower and that might speed up your queries. >> >> This *is* an enormous advantage, but I dont think I want to go down >> this route because I would potentially have to perform some database >> maintenance every time I want to insert any records. > Hi Jazz, > > I don't think you have to perform any database maintenance at INSERT > time. The generated column will automatically do the maintenance for you. Ahhh, I think I misunderstood what you were originally suggesting. Yes, that seems like good approach. I can use the function that Sylvain provided as the CASTing function. Thanks again everyone. Regards, Jazz