...
Code Block |
---|
select distinct
'IR',
case when not exists (select * FROM dwhs_ods..ca_chart_t a where a.fin_coa_cd= 'IR'
AND a.FIN_COA_ACTIVE_CD <> 'N' )
then 'false'
else 'true'
end
SELECT FIN_COA_CD, FIN_COA_ACTIVE_CD FROM dwhs_ods..ca_chart_t WHERE fin_coa_cd IN ('IR', 'MC'); |
Result Schema:
Returns the chart code and true or false
...