SELECT par_code partcode, par_desc partdescription, par_org partorganization, p.par_bylot trackbylot
FROM   r5parts p, r5userorganization u 
WHERE p.par_code <> '*' 
AND p.par_org = u.uog_org 
AND COALESCE(p.par_notused, '-') <> '+' 
AND COALESCE(p.par_byasset,'-') = '+'
AND NOT (p.par_parentpart IS NULL AND COALESCE(p.par_trackbycondition, '-') = '+')
and u.uog_user = <parameter.r5user> and ( u.uog_common = '+' or u.uog_org = <control.org>)