this query will fail based on the positioning of your 'End' of case statement. It would need to be inside parens
If you would provide DDL from FROMR_MNTH_CNT it may help.
Hi Glass, thank you for your reply and help.
I did move the END inside parens and same result (also had remove one outer paren when I did this so I think it was essentially the same code). I still get a decimal value not sure why. I can sum the 3 months and get an accurate number but AVG of the 3 is not working right. Here is the output...
Also could you please provide instructions on how to get DDL - I have googled this but only find entire DB not just for 1 table. Thank you.
R_CVRG_CNT DECIMAL(2,0) NOT NULL COMPRESS (0. ,1. ),
Here is DDL for above - please advise how to get AVG to calculate properly.