0
Good morning, I need to subtract a day from all the data of the bank in the period of 5 months and update the bank with these new values. The query below returns the data already discounted one day:
SELECT DATE_SUB(DateAndTime, INTERVAL 1 DAY) FROM floattablediario
WHERE DateAndTime between '2020-01-01' AND '2020-05-26'
AND TagIndex = 0
order by DateAndTime asc;
If I update based on this query, it does not update all data:
UPDATE floattablediario SET DateAndTime = DATE_SUB(DateAndTime, INTERVAL 1 DAY)
WHERE DateAndTime between '2020-01-01' AND '2020-05-26'
AND TagIndex = 0
order by DateAndTime asc;
How could I do this update?