Reputation: 2255
How do I update values from another table where the value of the column is 2010?
This is the select SQL statement that returns the results I want
SELECT Devices.Name,TempKaspersky.Lisence
FROM TempKaspersky
INNER JOIN devices
On lower(TempKaspersky.MachineName)=devices.name
Where TempKaspersky.Lisence=2010
Now i want to update Devices.lisence column with 2010? How can i achieve this in SQLite?
Upvotes: 1
Views: 66
Reputation: 6184
This is what you want to do:
UPDATE Devices
SET Devices.lisence = 2010
WHERE Devices.Name IN
(SELECT lower(MachineName) FROM TempKaspersky WHERE Lisence=2010)
Upvotes: 2