In your SELECT CASE.... and WHERE clauses CDE has not matched selection criteria: '100','200', '300' and '00100', '00802'... If '00100', '00802'.. is not CDE, but another field CDEXX use temporary table method as shown in example. This SQL applies only to predefined (hardcoded) CDE values '100','200', '300'. I am not sure if you could use sofcoding to get result within only one SQL statement.
Code
Code
Comment