joylene6
asked on
Question of combining two IN SELECT statements to make a between statement
Hello- I am using a IN SELECT statement to add a date to my query in MSACCESS, In (select AD from Admit_Date). Where AD is a field from the local table Admit_Date.
I want to call a date range from two local tables the two statements I have is In (select AD from Admit_Date) and
I tried something like these, but it does not seem to work:
Between (In (select AD from Admit_Date) and (In (DC from Discharge_Date))
or
Between In (select AD from Admit_Date) and In (DC from Discharge_Date)
Is there a better way?
I want to call a date range from two local tables the two statements I have is In (select AD from Admit_Date) and
I tried something like these, but it does not seem to work:
Between (In (select AD from Admit_Date) and (In (DC from Discharge_Date))
or
Between In (select AD from Admit_Date) and In (DC from Discharge_Date)
Is there a better way?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you. With this suggestion I was able to modify the query.
The syntax for a Between clause is:
Select ...
From YourFirstTable
Where YourDate Between Admit_Date and Discharge_Date;