SELECT err.message "System log message",
err.errormodule "Module",
err.suberrormodule "Sub Module",
err.action "Action",
err.type "Type",
au.first_name "Performed by",
longtodate(err.occurredtime) "Time of occurrence" FROM errorlog err
LEFT JOIN aaauser au ON err.ownerid=au.user_id
WHERE err.action LIKE '%Delete%'
AND err.suberrormodule LIKE '%Survey%'
AND au.first_name IS NOT NULL