I'm sure the problem with this SQL goes deeper than syntax error. This worked great before I tried to add email addresses to my results.
Syntax error on line 13 and 23:
(SELECT
a.EMPLID,
a.EMPL_RCD,
a.EMPL_STATUS,
a.HR_STATUS,
a.EFFSEQ,
a.ACTION,
(CONVERT(CHAR(10),a.[EFFDT],110)) AS...