A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

eliminate data subset from query



 
 
Thread Tools Display Modes
  #1  
Old October 27th, 2008, 05:55 PM posted to microsoft.public.access.queries
Daniel Collison[_2_]
external usenet poster
 
Posts: 43
Default eliminate data subset from query

A table includes records related to patient admission episodes. I have
created a query [qry Discharges =6/30/07 #2] that shows all admission
episodes with a discharge date =6/30/07.

I would like to create a second query of all admissions episodes that
exclude those identified in [qry Discharge =6/30/07 #2]

In my second query, I have identified the following as a criteria for the
admissions episode id [Admission Episode]: Not [qry Discharges 6/30/07
#2]![Admission Episode]

This results in the query prompting me to "Enter Parameter Value" and
ulitmately produces no records.

Any suggestions?
  #2  
Old October 27th, 2008, 06:36 PM posted to microsoft.public.access.queries
Jeff Boyce
external usenet poster
 
Posts: 8,621
Default eliminate data subset from query

Daniel

?You want the records with discharge dates that are not =6/30/07?

Have you tried #6/30/07#?

Regards

Jeff Boyce
Microsoft Office/Access MVP

"Daniel Collison" wrote in
message ...
A table includes records related to patient admission episodes. I have
created a query [qry Discharges =6/30/07 #2] that shows all admission
episodes with a discharge date =6/30/07.

I would like to create a second query of all admissions episodes that
exclude those identified in [qry Discharge =6/30/07 #2]

In my second query, I have identified the following as a criteria for the
admissions episode id [Admission Episode]: Not [qry Discharges 6/30/07
#2]![Admission Episode]

This results in the query prompting me to "Enter Parameter Value" and
ulitmately produces no records.

Any suggestions?



  #3  
Old October 27th, 2008, 07:48 PM posted to microsoft.public.access.queries
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default eliminate data subset from query

Try this --
SELECT *
FROM YourTable LEFT JOIN [qry Discharges =6/30/07 #2] ON
YourTable.[Admission Episode] = [qry Discharges =6/30/07 #2].[Admission
Episode]
WHERE [qry Discharges =6/30/07 #2].[Admission Episode] Is Null;
--
KARL DEWEY
Build a little - Test a little


"Daniel Collison" wrote:

A table includes records related to patient admission episodes. I have
created a query [qry Discharges =6/30/07 #2] that shows all admission
episodes with a discharge date =6/30/07.

I would like to create a second query of all admissions episodes that
exclude those identified in [qry Discharge =6/30/07 #2]

In my second query, I have identified the following as a criteria for the
admissions episode id [Admission Episode]: Not [qry Discharges 6/30/07
#2]![Admission Episode]

This results in the query prompting me to "Enter Parameter Value" and
ulitmately produces no records.

Any suggestions?

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:11 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.