A Microsoft extension to the ANSI SQL language that includes procedural programming, local variables, and various support functions.
In this case, it is a simple fix:
Update Mosa
Set pv = 0
,vfr = 'Invalid Input;'+ISNULL(vfr,'')
WHERE Quantity = 0 OR Quantity IS NULL
AND processed_file IS NULL
Run it only once.