Skip to main content
Inspiring
October 22, 2008
Answered

Update Query

  • October 22, 2008
  • 1 reply
  • 742 views
I have a table that contains 230 unique records and another with 20000. I want to update the second table using a comparison between a common fields in both tables. My query is shown below.

However, when I run this query I get the following error:

[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft Access Driver] Operation must use an updateable query.

The error occurred in C:\ColdFusion8\wwwroot\electrack\cfTest.cfm: line 10

8 : <body>
9 :
10 : <cfquery name="ConvertCNameToCNumber" datasource="#request.datasource#">
11 :
12 : Update PollingZtation p

How do I fix this. I am running windows vista.

Query:
This topic has been closed for replies.
Correct answer paross1
How about something like this?

UPDATE PollingZtation p
INNER JOIN Constituency c ON c.ConstituencyName = p.Constituency
SET p.ConstituencyNo = c.ConstituencyNo

Phil

1 reply

paross1Correct answer
Participating Frequently
October 22, 2008
How about something like this?

UPDATE PollingZtation p
INNER JOIN Constituency c ON c.ConstituencyName = p.Constituency
SET p.ConstituencyNo = c.ConstituencyNo

Phil
AbdlahAuthor
Inspiring
October 22, 2008
Thanks, that solved the problem.