Created 04-28-2020 03:54 AM
Hi,
I am trying to use And condition in a case statement but it is not considering 2nd condition while executing.
Example:
select
case when a =1 and b =2
then
"Data received"
END
Please let me know can we use And statement in case or not?
@Munnanani
Created on 04-29-2020 01:54 PM - edited 04-29-2020 01:54 PM
I just ran the following query through Hive and it worked as expected.
select col1, col2, case when col1 = "Female" and col2 = "Yes" then "Data Received" end from table_name limit 100;
Can you provide some steps to reproduce?