472,133 Members | 1,087 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,133 software developers and data experts.

Updating a Table

Team,

I am trying to update few columns of a table using other table.

Please find the query below. When I am excuting it I am getting an error" Query should be an updateable query"
Expand|Select|Wrap|Line Numbers
  1. UPDATE Outage_Details
  2. SET Outage_Details.Final_Status = (Select Stafftime_Outages_Exceptions.Final_Status from Stafftime_Outages_Exceptions where Stafftime_Outages_Exceptions.Badge= Outage_Details.Badge);
Regards,
Malay
Sep 4 '07 #1
1 902
pbmods
5,821 Expert 4TB
Heya, Malay. Welcome to TSDN!

Please use CODE tags when posting source code. See the REPLY GUIDELINES on the right side of the page next time you post.

Instead of a subquery, try using a join.

http://dev.mysql.com/doc/refman/5.1/en/update.html (look about halfway down the page)
Sep 4 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

11 posts views Thread by Jason | last post: by
1 post views Thread by Mark | last post: by
2 posts views Thread by Alexey.Murin | last post: by
4 posts views Thread by Geoff | last post: by
33 posts views Thread by bill | last post: by
2 posts views Thread by =?Utf-8?B?VmFuZXNzYQ==?= | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.