You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Praveenkumar Ch <pr...@tcs.com> on 2012/10/12 08:40:19 UTC
Fw: need help to write a query that does same as BETWEEN operator
Hi I am new to hive and we have a requirement for converting terra-data
queries to hive queries. So i was successful converting them.. so far.....
but now i have a teradata query that has BETWEEN operator in it, i don't
know how to convert using hive equi-joins.. can someone help me??
here is my query:
SELECT *
FROM account a, timezone g
WHERE
a.create_date BETWEEN g.start_date AND g.end_date ;
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
Re: Fw: need help to write a query that does same as BETWEEN operator
Posted by MiaoMiao <li...@gmail.com>.
You familiar with SQL?
I'm sure this manual will help. https://cwiki.apache.org/Hive/
On Fri, Oct 12, 2012 at 2:40 PM, Praveenkumar Ch
<pr...@tcs.com> wrote:
> Hi I am new to hive and we have a requirement for converting terra-data
> queries to hive queries. So i was successful converting them.. so far.....
> but now i have a teradata query that has BETWEEN operator in it, i don't
> know how to convert using hive equi-joins.. can someone help me??
>
>
> here is my query:
>
> SELECT *
> FROM account a, timezone g
> WHERE
> a.create_date BETWEEN g.start_date AND g.end_date ;
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
Re: need help to write a query that does same as BETWEEN operator
Posted by Bejoy KS <be...@yahoo.com>.
Hi Praveen
If Between is not supported in your hive version, you can replace Between using < and > . Like
SELECT *FROM account a, timezone.g WHERE a.create_date >= g.start_date AND a.create_date <= g.end_date ;
Regards
Bejoy KS
Sent from handheld, please excuse typos.
-----Original Message-----
From: Praveenkumar Ch <pr...@tcs.com>
Date: Fri, 12 Oct 2012 12:10:19
To: <us...@hive.apache.org>
Reply-To: user@hive.apache.org
Subject: Fw: need help to write a query that does same as BETWEEN operator
Hi I am new to hive and we have a requirement for converting terra-data
queries to hive queries. So i was successful converting them.. so far.....
but now i have a teradata query that has BETWEEN operator in it, i don't
know how to convert using hive equi-joins.. can someone help me??
here is my query:
SELECT *
FROM account a, timezone g
WHERE
a.create_date BETWEEN g.start_date AND g.end_date ;
=====-----=====-----=====
Notice: The information contained in this e-mail
message and/or attachments to it may contain
confidential or privileged information. If you are
not the intended recipient, any dissemination, use,
review, distribution, printing or copying of the
information contained in this e-mail message
and/or attachments to it are strictly prohibited. If
you have received this communication in error,
please notify us by reply e-mail or telephone and
immediately and permanently delete the message
and any attachments. Thank you
Re: Fw: need help to write a query that does same as BETWEEN operator
Posted by suneel hadoop <su...@gmail.com>.
Hi Praveen,
It should work the version which I'm using is 0.9.0
Thanks,
Suneel
On Friday, 12 October 2012, Praveenkumar Ch wrote:
> Hi I am new to hive and we have a requirement for converting terra-data
> queries to hive queries. So i was successful converting them.. so far.....
> but now i have a teradata query that has BETWEEN operator in it, i don't
> know how to convert using hive equi-joins.. can someone help me??
>
>
> *here is my query:*
>
> *SELECT **
> *FROM account a, timezone g*
> *WHERE*
> *a.create_date BETWEEN g.start_date AND g.end_date ;*
>
> =====-----=====-----=====
> Notice: The information contained in this e-mail
> message and/or attachments to it may contain
> confidential or privileged information. If you are
> not the intended recipient, any dissemination, use,
> review, distribution, printing or copying of the
> information contained in this e-mail message
> and/or attachments to it are strictly prohibited. If
> you have received this communication in error,
> please notify us by reply e-mail or telephone and
> immediately and permanently delete the message
> and any attachments. Thank you
>
>