wow that is a neat query, love how it shows the person nbr and the actual counts for the person numbers.
that is wonderful!!!
I will be using that to work on another query.
thank you so much, life savor! :)
Patty
---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Patty-
What list of numbers do you get when you run just this query?
SELECT Person_nbr, Count([Person_nbr]) As CountUrgent
FROM ER_Hosp_visits_6mos
WHERE (((ER_Hosp_visits_6mos.encounterType)="Emergency Room")) OR (((ER_Hosp_visits_6mos.encounterType)="Urgent Care"))
GROUP BY Person_nbr
HAVING Count(*) >= 3
The full query should NOT pick anyone except those in this list.
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Feb 2, 2015, at 10:11 PM, pattykf@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:I was trying to figure out a way to show you that it is pulling all the patients not only those that have 3 so came up with pictures
the query lists each patient once but it pull all the patients. I made some screen shots and eliminated the personal information to show you what I mean.
this is the query result, the ones that are pink do not have 3 ER or Urgent
__._,_.___
Posted by: pattykf@cox.net
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (41) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar