salix/db/versions/.archive/10207-greenRose/01-Update_invoiceAmount.sql

4 lines
203 B
MySQL
Raw Normal View History

UPDATE IGNORE vn.entry e
JOIN vn.worker w ON w.code = TRIM(Right(REPLACE(e.notes, Char(10), ""), 4))
SET invoiceAmount = CAST(REPLACE(notes, ',', '.') as DECIMAL (10,2)),
buyerFk = w.id;