When I run the query:
UPDATE InvHead I
JOIN (SELECT InvNo,Sum(Rate + CASE WHEN AttendingAcademy=1 THEN 30 ELSE 0
END) AS InvTot
FROM Participants P GROUP BY InvNo) AS PartSum ON
PartSum.InvNo=I.InvNo
SET I.Total=PartSum.InvTot
WHERE (I.InvoiceType='CL' OR I.InvoiceType='CSS') AND I.RegFinishedDate IS
NOT NULL
It initially updates several rows. However, when I run it again, it updates
no rows at all. If I then go in and manually change the Total to an
incorrect value, then run it again, it updates that one row. Does MySQL
check a value before updating it, and if it is the same as the value that
it's updating it with, it doesn't bother updating it again?
Thanks,
Jesse
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]