Formatting code for EMailAddressesActivePatients


show source only

======E-Mail Addresses For Active Patients ======

Back to [[QueryDirectory Query Directory]]

//
I need a list of active patients with their email addresses. Only list those with emails, and sort in order by name.
//


%%(sql)
SELECT DISTINCT
a.lastname, a.firstname, b.email
FROM
patients a JOIN payors b ON a.payornum = b.payornum
WHERE
flag = 0 AND dischargedate IS NULL AND email > ''
ORDER BY
a.lastname, a.firstname, b.email
%%


----
CategoryQueries
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki