I am looking at ways to reduce this repititous code to a simple join or something similiar. Here is the context: We evaluate based upon different codes if a person has any remaining elgibility for say an insurance policy. If the have XYZ it may be
good for 36 months. If the have YYZ (Hat Tip Rush) then it might be good for 48 months etc. So we join to a control table that has the codes and their terms. As each row is "processed" we return a Y or N to see if their time is up.
--Start with our unlimited subscriptions
WHEN dfm.TypeofSub IN('FIR' ,'FNS') THEN 'Y'
--D Policy Codes
WHEN dfm.TypeofSub IN ('D25' ,'D38', 'D23', 'D59')
View Complete Post