Subquery nested in Update query

  • Thread starter Thread starter JoeA2006
  • Start date Start date
J

JoeA2006

I am trying to update a columns with a column from a subquery and I receive
"an operation must use updateable query"

UPDATE MyTable SET MyField = (Select TheField from TheTable where TheField >1)

How should I do this?
 
I am trying to update a columns with a column from a subquery and I receive
"an operation must use updateable query"

UPDATE MyTable SET MyField = (Select TheField from TheTable where TheField >1)

How should I do this?

The subquery could contain many different values of MyField. If MyTable
contains 2125 records and TheTable contains 5124 records, all with different
values of TheField, which of those 5124 values should be put into each record
of MyTable?!

Please explain the real world situation. What are your tables? How are they
related? Which record or records do you want to update, and how do you
ascertain which record should supply the value?
 
Back
Top