469,277 Members | 1,942 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,277 developers. It's quick & easy.

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 862
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
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.