Return-Path: X-Original-To: apmail-hive-user-archive@www.apache.org Delivered-To: apmail-hive-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1A09D10691 for ; Fri, 23 Aug 2013 06:03:06 +0000 (UTC) Received: (qmail 9315 invoked by uid 500); 23 Aug 2013 06:03:04 -0000 Delivered-To: apmail-hive-user-archive@hive.apache.org Received: (qmail 8938 invoked by uid 500); 23 Aug 2013 06:03:02 -0000 Mailing-List: contact user-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hive.apache.org Delivered-To: mailing list user@hive.apache.org Received: (qmail 8908 invoked by uid 99); 23 Aug 2013 06:03:00 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Aug 2013 06:03:00 +0000 X-ASF-Spam-Status: No, hits=1.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of nhsandeep6@gmail.com designates 209.85.212.44 as permitted sender) Received: from [209.85.212.44] (HELO mail-vb0-f44.google.com) (209.85.212.44) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Aug 2013 06:02:55 +0000 Received: by mail-vb0-f44.google.com with SMTP id e13so162583vbg.3 for ; Thu, 22 Aug 2013 23:02:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=p6ZEGoXabplvtLr2SILmYQRiUwJKylNZLLGbYrFRB6E=; b=DolWzIKV2RTRaEgcqEEcsuQCVm8fqXON7GkN2WcjG+HCEwNV0s2SqZRR4WruY9sa7v Eg93pl/d4WN0A2/sF79tXIogTss07ljNtoGKcGlD7SKpCqwJ0llK4XY1fYio/WvmwAHX FFOjuoKi5aiwMzTOhR6SGwese+xnMNOARVehpBTl5KYTaCHedYRsyHD1WXyNemEs2vZo xGe5fBldhAAAn8gXJxxhtHhW4bCQO0MsG9E00BhWzDqMMtg68GyixCGMK4nzii3UBN8e l07CvI8lJ7HujWPAWdsXjXmaDcpiN1VminTnLEJtsWk2VhsN2FYmoZK2nTwTvoBOBnzb uRNQ== MIME-Version: 1.0 X-Received: by 10.220.11.7 with SMTP id r7mr14917978vcr.12.1377237754583; Thu, 22 Aug 2013 23:02:34 -0700 (PDT) Received: by 10.220.106.198 with HTTP; Thu, 22 Aug 2013 23:02:34 -0700 (PDT) In-Reply-To: References: <5941744706657370536@unknownmsgid> Date: Fri, 23 Aug 2013 11:32:34 +0530 Message-ID: Subject: Re: How to perform arithmetic operations in hive From: Sandeep Nemuri To: Hive user group Content-Type: multipart/alternative; boundary=001a11c3e47c221f0c04e4972729 X-Virus-Checked: Checked by ClamAV on apache.org --001a11c3e47c221f0c04e4972729 Content-Type: text/plain; charset=ISO-8859-1 Thanks Justin Workman and Sanjay Subramanian. It worked !! On Fri, Aug 23, 2013 at 8:27 AM, Sanjay Subramanian < Sanjay.Subramanian@wizecommerce.com> wrote: > Yes this will work > Also arithmetic operations will work in a WHERE clause > Example > > select channel_id from keyword_impressions_log where > header_date_partition='2013-08-21' and channel_id*10=290640 limit 10 > > From: Justin Workman > Reply-To: "user@hive.apache.org" > Date: Thursday, August 22, 2013 7:17 AM > To: "user@hive.apache.org" > Subject: Re: How to perform arithmetic operations in hive > > Try > > select emp_name, (emp_no * 10) from emp_table; > > Sent from my iPhone > > On Aug 22, 2013, at 8:14 AM, Sandeep Nemuri wrote: > > Hi all , > Can we perform arithmetic operator on *select* command. > I have a table emp_table with columns emp_name and emp_no > i want to multiply the data in a emp_no with 10 . > > i tryed select * from emp_table where emp_no=emp_no*10; > But it did not work . > Help me out > > Thanks in advance . > > > --Regards > Sandeep Nemuri > > > CONFIDENTIALITY NOTICE > ====================== > This email message and any attachments are for the exclusive use of the > intended recipient(s) and may contain confidential and privileged > information. Any unauthorized review, use, disclosure or distribution is > prohibited. If you are not the intended recipient, please contact the > sender by reply email and destroy all copies of the original message along > with any attachments, from your computer system. If you are the intended > recipient, please be advised that the content of this message is subject to > access, review and disclosure by the sender's Email System Administrator. > -- --Regards Sandeep Nemuri --001a11c3e47c221f0c04e4972729 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks=A0Justin Workman and=A0Sanjay Subramanian. It worked !!=A0


On Fri, Aug 2= 3, 2013 at 8:27 AM, Sanjay Subramanian <Sanjay.Subramani= an@wizecommerce.com> wrote:
Yes this will = work
Also arithmeti= c operations will =A0work in a WHERE clause
Example

= select channel_id from keyword_impressions_log where header_date_partition= =3D'2013-08-21' and channel_id*10=3D290640 limit 10

From: Justin Workman <justinjworkman@gmail.co= m>
Reply-To: "user@hive.apache.org" <<= a href=3D"mailto:user@hive.apache.org" target=3D"_blank">user@hive.apache.o= rg>
Date: Thursday, August 22, 2013 7:1= 7 AM
To: "user@hive.apache.org" <user@hive.apache.org= >
Subject: Re: How to perform arithme= tic operations in hive

Try=A0

select emp_name, (emp_no * 10) from emp_table;

Sent from my iPhone

On Aug 22, 2013, at 8:14 AM, Sandeep Nemuri <nhsandeep6@gmail.com> wrote:

Hi all ,
=A0 =A0 =A0 =A0 =A0Can we perform arithmetic operator on select= command.
I have a table emp_table with columns emp_name and emp_no
i want to multiply the data in a emp_no with 10 .

i tryed=A0select * from emp_table where emp_no=3Demp_no*10;
But it did not work .
Help me out=A0

Thanks in advance .


--Regards
=A0 Sandeep Nemuri

CONFIDENTIALITY NOTICE
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
This email message and any attachments are for the exclusive use of the int= ended recipient(s) and may contain confidential and privileged information.= Any unauthorized review, use, disclosure or distribution is prohibited. If= you are not the intended recipient, please contact the sender by reply email and destroy all copies of the ori= ginal message along with any attachments, from your computer system. If you= are the intended recipient, please be advised that the content of this mes= sage is subject to access, review and disclosure by the sender's Email System Administrator.



--
--Regards
=A0 Sandeep Nemuri
--001a11c3e47c221f0c04e4972729--