Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

UPDATE QUERY PROBLEM

Status
Not open for further replies.

Guest
What I'm trying to do is update the data in last_free column in diskdrives table ONLY WHEN DiskDrives.servername = Last_Space.Servername (this is probably a db no no but i'm just using to explain). I get a use an updateable query error. I know for sure that it's not a problem with permissions since I am logged in as an admin.

Here's my sql update query:

"UPDATE DiskDrives Set DiskDrives.Last_Free = (SELECT Previous_Percent FROM Last_Space WHERE ServerName = DiskDrives.ServerName) "
 
Something like this ?
UPDATE DiskDrives INNER JOIN Last_Space ON DiskDrives.ServerName = Last_Space.ServerName
SET DiskDrives.Last_Free = Last_Space.Previous_Percent

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top