Insert value returned by query into table

G

Guest

I have a query that assigns a rank to competitors in an athletic event.


SELECT tblEventResults.fkAthlete, tblEventResults.fkMeetEventID,
tblEventResults.STimeResult, (SELECT Count(*) FROM tblEventResults AS T
WHERE T.STimeResult < tblEventResults.STimeResult AND T.fkMeetEventID =
tblEventResults.fkMeetEventID)+1 AS SeedPlace, tblMeetEvents.Event,
tblMeet.MeetDate
FROM tblMeet INNER JOIN (tblMeetEvents INNER JOIN tblEventResults ON
tblMeetEvents.MeetEventID = tblEventResults.fkMeetEventID) ON tblMeet.MeetID
= tblMeetEvents.fkMeetID
ORDER BY tblEventResults.STimeResult, tblEventResults.fkAthlete;


Maybe I’m making this harder than it is, but how can I store the field
“SeedPlace†to my “EventResults†table? I’ve searched the discussion groups
but I’m too dumb to find what I’m looking for.

Thanks.
 
F

fredg

I have a query that assigns a rank to competitors in an athletic event.

SELECT tblEventResults.fkAthlete, tblEventResults.fkMeetEventID,
tblEventResults.STimeResult, (SELECT Count(*) FROM tblEventResults AS T
WHERE T.STimeResult < tblEventResults.STimeResult AND T.fkMeetEventID =
tblEventResults.fkMeetEventID)+1 AS SeedPlace, tblMeetEvents.Event,
tblMeet.MeetDate
FROM tblMeet INNER JOIN (tblMeetEvents INNER JOIN tblEventResults ON
tblMeetEvents.MeetEventID = tblEventResults.fkMeetEventID) ON tblMeet.MeetID
= tblMeetEvents.fkMeetID
ORDER BY tblEventResults.STimeResult, tblEventResults.fkAthlete;

Maybe Iÿm making this harder than it is, but how can I store the field
´SeedPlace¡ to my ´EventResults¡ table? Iÿve searched the discussion groups
but Iÿm too dumb to find what Iÿm looking for.

Thanks.

You're using Access, not Excel.
You don't store calculated values.
Anytime you need that value, run the query.
 
A

Amy Blankenship

fredg said:
You're using Access, not Excel.
You don't store calculated values.
Anytime you need that value, run the query.


You might need to if you wanted to store what the calculated value was on a
given day.

You could probably use something like:

Update EventResults Set EventResults.Seedplace = (SELECT ....Your SQL here)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top