|
chedderslam
Posting Yak Master
223 Posts |
Posted - 2009-09-16 : 14:35:30
|
| SELECT coverage = CASE WHEN e.coverage = 'BI' THEN 1 WHEN e.coverage = 'CL' THEN 3 END, rate_zip = CASE WHEN e.driver_class IN ('300','301','302','303', '304','400','401','402', '403','404') THEN '99200' WHEN e.driver_class IN ('100','101','102') THEN '99250' WHEN e.driver_class IN ('114','115','116','214', '215','216','314','315', '316','414','415','416') THEN '99600' WHEN d.business_use = 'Y' AND e.driver_class NOT IN ('100','101','102','300', '301','302','303','304', '400','401','402','403', '404') THEN '99300' ELSE '99100' END, insurer_vehicles = CASE WHEN e.cancel_code IN ('CR','UD','UI','UL', 'UV','UW','RW') THEN Count(e.vehicle_number) END, nonpay_vehicles = CASE WHEN e.cancel_code IN ('AD','AP','AR','FN', 'NA','ND','NF','NI', 'NP','NS') THEN Count(e.vehicle_number) END, insured_vehicles = CASE WHEN e.cancel_code IN ('II','IR') THEN Count(e.vehicle_number) ENDFor the last three columns, if the in list is not matched, what will the column be set to? Null? |
|