Solved

SELECT From Table With Selection Criteria Being Data in a Separate Query

Posted on 2012-03-16
3
246 Views
Last Modified: 2012-03-16
Thank you for looking at my question,

Table X contains all production data from a number of different manufacturing transactions across a range of locations.

I have extracted data relevant to my location into Table Y using a Make Table query and plan to do some further analysis on this data.

I want to update Table Y using an Append query.

The criterion I wish to select Table X data around is the Max Date in Table Y which is stored in a separate query qryTableY_MaxDate.

How do I specify the value in qryTableY_MaxDate as the selection criterion in the append query?

eg SELECT * FROM Table X Where TRAN_DATE>qryTableY_MaxDate.Date

Your help will be appreciated greatly
0
Comment
Question by:Crxfrd
  • 2
3 Comments
 
LVL 61

Expert Comment

by:mbizup
ID: 37729074
Try this:

SELECT * FROM TableX , qryTableY_MaxDate WHERE TRAN_DATE>qryTableY_MaxDate.Date
0
 
LVL 61

Accepted Solution

by:
mbizup earned 500 total points
ID: 37729090
Or to just select records from TableX:

SELECT TableX .* FROM TableX , qryTableY_MaxDate WHERE TRAN_DATE>qryTableY_MaxDate.Date
0
 

Author Closing Comment

by:Crxfrd
ID: 37729193
Perfect, Thank you
0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

'Between' is such a common word we rarely think about it but in SQL it has a very specific definition we should be aware of. While most database vendors will have their own unique phrases to describe it (see references at end) the concept in common …
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question