You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by yogesh dhari <yo...@gmail.com> on 2013/12/24 13:04:39 UTC
CASE Statement not working in hive
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