Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2012-03-16
3
Medium Priority
?
266 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 2000 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

An alternative to the "For XML" way of pivoting and concatenating result sets into strings, and an easy introduction to "common table expressions" (CTEs). Being someone who is always looking for alternatives to "work your data", I came across this …
Windows Explorer lets you open cabinet (cab) files like any other folder. In VBA you can easily handle normal files and folders, but opening and indeed creating cabinet files takes a lot more - and that's you'll find here.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

926 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