Select 
CSR_STRLEVEL2 as code,
CSR_DESC as description,
CSR_IMPORTANCE as importance,
CSR_MATERIALTYPE as materialtype
from R5CodeStructure where 
CSR_STRLEVEL1=<param.syslevel> and 
CSR_STRLEVEL2 is NOT NULL and 
CSR_STRLEVEL3 is NULL
AND COALESCE(csr_notused, '-') = '-'
order by CSR_STRLEVEL2
