Y
Yair
Greetings,
I'm having trouble getting unique results from the a query which uses the
"last of" a date column and any other fields. Whenever I select another
field, multiple records appear for each entry.
In the simplest case, I have two tables that are used in the query:
Projects
ScheduleSnapshot
Projects is primary keyed by ProjectTitle, which is the foreign key in the
ScheduleSnapshot table. The ScheduleSnapshot table has a DateRealized
columnt which indicates the date the record was entered.
Here is the query:
SELECT DISTINCTROW ScheduleSnapshot.ProjectTitle,
Last(ScheduleSnapshot.DateRealized) AS LastOfDateRealized,
ScheduleSnapshot.ContractorsEstCompDate
FROM Projects INNER JOIN ScheduleSnapshot ON Projects.ProjectTitle =
ScheduleSnapshot.ProjectTitle
GROUP BY ScheduleSnapshot.ProjectTitle,
ScheduleSnapshot.ContractorsEstCompDate;
I would like this query to return 1 record for each ProjectTitle, with the
contractors completion date a unique value corresponding to the last date
realized, but the query returns completion dates for each date realized.
Thanks for the help.
I'm having trouble getting unique results from the a query which uses the
"last of" a date column and any other fields. Whenever I select another
field, multiple records appear for each entry.
In the simplest case, I have two tables that are used in the query:
Projects
ScheduleSnapshot
Projects is primary keyed by ProjectTitle, which is the foreign key in the
ScheduleSnapshot table. The ScheduleSnapshot table has a DateRealized
columnt which indicates the date the record was entered.
Here is the query:
SELECT DISTINCTROW ScheduleSnapshot.ProjectTitle,
Last(ScheduleSnapshot.DateRealized) AS LastOfDateRealized,
ScheduleSnapshot.ContractorsEstCompDate
FROM Projects INNER JOIN ScheduleSnapshot ON Projects.ProjectTitle =
ScheduleSnapshot.ProjectTitle
GROUP BY ScheduleSnapshot.ProjectTitle,
ScheduleSnapshot.ContractorsEstCompDate;
I would like this query to return 1 record for each ProjectTitle, with the
contractors completion date a unique value corresponding to the last date
realized, but the query returns completion dates for each date realized.
Thanks for the help.