CASE Statement with IS NOT NULL with AND not working with Confluent Cloud 7.2.0

select
ROWKEY,
CASE
WHEN t1.PremiumInclFees IS NOT NULL AND t2.PremiumInclFees IS NOT NULL
THEN t1.PremiumInclFees + t2.PremiumInclFees
WHEN t1.PremiumInclFees IS NULL
THEN t2.PremiumInclFees
WHEN t2.PremiumInclFees IS NULL
THEN t1.PremiumInclFees
ELSE cast(0.0 as double) END flowAmount,

The above case statement is not working. t1 and t2 are two tables used in the query. Can any one guide me on this?

Hi @jrajendra and welcome to the Confluent Community Forum!

Nothing jumps out at me. What error do you hit? Could you please provide more context to enable the community to repro the error (t1 and t2 DDL and the complete join query)?

Dave

This topic was automatically closed after 30 days. New replies are no longer allowed.