G
George Atkins
I have several linked MS SQL SVR tables. I need to update multiple records in
one of the tables, but I'm having a problem. First, the basics:
Main table is Enrollments. it contains student records over many years, so
each student can have multple records, identified by enrollment ID (key) or
other data. I need to update one record for each selected student.
Qry902NonPubList - a query of other linked SQL tables producing a list of
student records that need to be modified.
Qry902NonPubList2008 - a query of linked SQL tables producing the values
that need to be entered into each student's record.
In fact, the two queries each reference Enrollments table to find this other
information, so it's some kind if incestuous relationship! Anyway...
I can update the enrollment table through a query if it is the only object
in the query and I manually enter the criteria. But when I link in the two
queries, I get the dreaded "operation must use an updateable query." I
understand that there are situations where queries cannot update SQL tables
(such as this!!), but I need a good workaround/solution.
Here is the SQL version of my query:
UPDATE (qry902NonPubList2008 INNER JOIN qry902NonPubList ON
qry902NonPubList2008.studentNumber = qry902NonPubList.studentNumber) INNER
JOIN dbo_Enrollment ON qry902NonPubList.enrollmentID =
dbo_Enrollment.enrollmentID SET dbo_Enrollment.startComments =
[qry902nonpublist2008].[startcomments]
WHERE (((dbo_Enrollment.startComments) Is Null));
I would be happy to e-mail a picture, if necessary. Any ideas how I should
handle this? I need to update a single record for each of nearly 600
students. Thanks for any ideas.
one of the tables, but I'm having a problem. First, the basics:
Main table is Enrollments. it contains student records over many years, so
each student can have multple records, identified by enrollment ID (key) or
other data. I need to update one record for each selected student.
Qry902NonPubList - a query of other linked SQL tables producing a list of
student records that need to be modified.
Qry902NonPubList2008 - a query of linked SQL tables producing the values
that need to be entered into each student's record.
In fact, the two queries each reference Enrollments table to find this other
information, so it's some kind if incestuous relationship! Anyway...
I can update the enrollment table through a query if it is the only object
in the query and I manually enter the criteria. But when I link in the two
queries, I get the dreaded "operation must use an updateable query." I
understand that there are situations where queries cannot update SQL tables
(such as this!!), but I need a good workaround/solution.
Here is the SQL version of my query:
UPDATE (qry902NonPubList2008 INNER JOIN qry902NonPubList ON
qry902NonPubList2008.studentNumber = qry902NonPubList.studentNumber) INNER
JOIN dbo_Enrollment ON qry902NonPubList.enrollmentID =
dbo_Enrollment.enrollmentID SET dbo_Enrollment.startComments =
[qry902nonpublist2008].[startcomments]
WHERE (((dbo_Enrollment.startComments) Is Null));
I would be happy to e-mail a picture, if necessary. Any ideas how I should
handle this? I need to update a single record for each of nearly 600
students. Thanks for any ideas.