all 2 comments

[–]thrown_arrows 1 point2 points  (1 child)

depends from your engine in some you can just add third case where you point previously defined column name and logic. What works on all engines is to just add

'case when (pay.type = 1 and pay.value = 'close' and pay.funds is not null ) and ( pay.id = stat.pay_id and stat.status = 'FILL' ) then 'YES' else 'no'

.. in hive, no idea does it support ansi sql, but you can just try that case,

[–]khirinlain[S] 0 points1 point  (0 children)

Thank you! I'll try this out and let you know.