sql - Case statement with multiple whens...not working! -
This is a simplified version of what I'm doing, but I can not find anything to work on. After the statement 'ERR' without giving a comma, I want an error that I want the column to be 'month' and I want to do this work, but I have a lot of trouble. Thanks for your help!
One Select POL_PRI_RSK_ST_CD, a.MASTER_COMPANY_NBR, when a.char046 is tap, then 'ERR' when a.char046> '010' then '11 + 'second a.char046 end as the policy_yesers, a.last7days, a.Last30Days, A.Last90Days one. RECORD_ID = b.RECORD_ID is reported from reporting an Inner Response B, where a.POL_OGN_EFF_DT> = '2008-11-01' group a.POL_PRI_RSK_ST_CD, a. MASTER_COMPANY_NBR, the case when a.char046 is taped, then 'ERR' when a.char046> '010' then '11 + 'ends in the form of second AIR 046 policy year, a.Last7Days, a.Last30Days, a Note: This question is the result of a debugging session in comments.Error in the form of 'code' as the keyword 'incorrect' Due to the
GROUP BY
section due to policy_years as, you used the
GROUP BY
section asNot allowed.
Comments
Post a Comment