Reputation: 79
I had a table and need to add one condition in column.
Select Age_Flag from table where (Age_Flag <> "AB" or isnotnull(Age_Flag)=False) and Date="2022-17-01";
My condition was to exclude only Age_Flag=AB and include all null value.The above query excluding null value and Age_Flag=AB.
Upvotes: 0
Views: 362
Reputation: 49400
You can check for NULL
values with IS
in hive also
So your query will be
Select Age_Flag from table
where (Age_Flag <> "AB" or Age_Flag IS NULL) and Date="2022-17-01";
Upvotes: 1