Patty-
If that query works for you, then there's no reason why the other query was returning patients who had not visited more than 3 times.
Glad you got what you finally wanted.
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 3, 2015, at 1:07 AM, pattykf@cox.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
I was able to use that to do a query for Hospital counts to meet that criteria query.
thank you, saved me a lot of work in excel to get this data otherwise.
Have a wonderful evening
Patty
---In MS_Access_Professionals@yahoogroups.com, <pattykf@...> wrote :
thank you, saved me a lot of work in excel to get this data otherwise.
Have a wonderful evening
Patty
---In MS_Access_Professionals@yahoogroups.com, <pattykf@...> wrote :
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 :
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: John Viescas <johnv@msn.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (43) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar