select 
p.pqu_certificationtype as CERTTP,
p.pqu_typedesc  as DESCRIPTION
FROM  r5personnelqualifications p, r5personnel e
WHERE e.per_user =<parameter.esignuser> AND e.per_code = p.pqu_person  
 AND (datetime('now') BETWEEN p.pqu_qualificationstart AND p.pqu_expiration )  AND ( p.pqu_tempdisqualified = '-' 
OR p.pqu_tempdisqualified IS NULL )  AND ( p.pqu_certification = <param.certnum> or 
(p.pqu_certification is not null and <param.certnum> is null))

