Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - CASE Statement not working in hive


Copy link to this message
-
CASE Statement not working in hive
yogesh dhari 2013-12-24, 12:04
Hello all,

I have wrote this query .

*" select*

*case when as_date rlike '2013-05-01' then as_date else '2013-07-04' end as
as_date from table AA ; " *
as the value of as_date i.e  2013-05-01 exists in table AA  it *should
return the value 2013-05-01 *(Which is true in case statement)  but it
always *results value in else condition i.e '2013-07-04'*

*"select as_date from AA ;"*

 2013-05-01
why is it so, pls suggest and help

Regards
Yogesh Kumar