Revision [450]

Last edited on 2011-05-05 09:47:14 by admin [added cancelflag in WHERE]
Additions:
AND a.cancelflag = 0


Revision [449]

Edited on 2011-05-04 10:25:23 by admin
Additions:
=====Patients with Appointments Today and a Significant Balance, Sorted by Site and Provider=====
List the names of patients with balances of $120 or more, sorted by site and provider, who are scheduled to be seen on the day the query is run.
SELECT
a.sitename+' ('+a.sitecode+')' AS "site",
(a.provlname+', '+a.provfname+' ('+provcode+')') AS "provider",
a.ptfullname,
a.id,
b.ptbalance
FROM
rv_appts a
JOIN pt_noninsbalance b ON a.ptnum = b.ptnum
WHERE
b.ptbalance >= 120
AND a.apptdate = TODAY()
ORDER BY
"site","provider",a.ptfullname,a.id
Deletions:
======Query Title ======
comments here appear in italics
paste your tested query here


Revision [448]

The oldest known version of this page was created on 2011-05-04 10:18:28 by admin [Cloned from NewQuery]
Valid XHTML 1.0 Transitional :: Valid CSS :: Powered by WikkaWiki