select 
o.obj_code as asset,
o.obj_desc as assetdesc,
o.obj_org as assetorg
from  r5mrcs m, r5objects o where  
 coalesce(o.obj_notused, '-') <> '+'  
 AND o.obj_rstatus IN ('I') 
and o.obj_obrtype = 'A'  
 and o.obj_mrc = m.mrc_code  AND ('true' = 'true' OR (<parameter.deptsec> ='OFF' OR
 (obj_mrc IN( SELECT dse_mrc FROM r5departmentsecurity WHERE dse_user =<parameter.r5user>
 AND dse_mrc = obj_mrc AND coalesce(dse_readonly, '-') = '-')))) and o.obj_code not in 
 (select air_obj from r5assetinventoryresults where air_obj=o.obj_code and air_obj_org=o.obj_org and 
 air_sessionid=<parameter.sessionid>)
