G
Gina K
I’m using a subquery to assign a FinishPlace to athletes competing in a race:
SELECT tblEventResults.fkMeetEventID, tblEventResults.EventResultsID,
tblEventResults.TimeResult, (SELECT Count(*) FROM tblEventResults AS T WHERE
T.TimeResult < tblEventResults.TimeResult AND T.fkMeetEventID =
tblEventResults.fkMeetEventID)+1 AS FinishPlace, tblEventResults.Override
FROM tblEventResults
WHERE (((tblEventResults.TimeResult)>0));
This results in a non-updateable query. However, I need the ability to
override the FinishPlace assigned by the query, hence the field “Overrideâ€.
I then want to have a stored field called FinalPlace:
(IIf(IsNull([Override]), [FinishPlace],[Override])
I know you’re almost never supposed to store a calculated value in a table,
but I will have to perform further subqueries against the value of the
FinalPlace in order to assign points to athletes, and I’m ending up with a
lot of nested queries/subqueries.
Any opinions/suggestions would be greatly appreciated.
Thanks.
SELECT tblEventResults.fkMeetEventID, tblEventResults.EventResultsID,
tblEventResults.TimeResult, (SELECT Count(*) FROM tblEventResults AS T WHERE
T.TimeResult < tblEventResults.TimeResult AND T.fkMeetEventID =
tblEventResults.fkMeetEventID)+1 AS FinishPlace, tblEventResults.Override
FROM tblEventResults
WHERE (((tblEventResults.TimeResult)>0));
This results in a non-updateable query. However, I need the ability to
override the FinishPlace assigned by the query, hence the field “Overrideâ€.
I then want to have a stored field called FinalPlace:
(IIf(IsNull([Override]), [FinishPlace],[Override])
I know you’re almost never supposed to store a calculated value in a table,
but I will have to perform further subqueries against the value of the
FinalPlace in order to assign points to athletes, and I’m ending up with a
lot of nested queries/subqueries.
Any opinions/suggestions would be greatly appreciated.
Thanks.