maximyshka
asked on
Help with MS ACCESS Query
It seems to me that i can't figure out simple thing.
I have two tables
table 1 - tblMilestones ( PKMilestoneID-number, ProjectID, MilestoneDate,MilestoneTyp eID)
table2 - tblTypesOfMilestones(PKMil estoneType ID,Milesto neName)
they have one to many relationships based on milestonetypeid.
I need to show The oldest Milestone per project.
But query should output ProjectId, MilestoneName and MilestoneDate
thanks for help.
db-question1.accdb
I have two tables
table 1 - tblMilestones ( PKMilestoneID-number, ProjectID, MilestoneDate,MilestoneTyp
table2 - tblTypesOfMilestones(PKMil
they have one to many relationships based on milestonetypeid.
I need to show The oldest Milestone per project.
But query should output ProjectId, MilestoneName and MilestoneDate
thanks for help.
db-question1.accdb
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
please try something like this :
select
tbl1.ProjectID,
tbl1.MilestoneDate,
tbl2.MilestoneName
from
tblMilestones tbl1,
tblTypesOfMilestones tbl2
where
tbl2.PKMilestoneTypeID = tbl1.MilestoneTypeID
and tbl1.MilestoneDate = (select min(MilestoneDate ) from tblMilestones )
I have nothing to test it here, but it should work
michel