Yes. It only reports the changed rows.
Regards,
Jerry Schwartz
Global Information Incorporated
195 Farmington Ave.
Farmington, CT 06032
860.674.8796 / FAX: 860.674.8341
> -Original Message-
> From: Jesse [mailto:[EMAIL PROTECTED]
> Sent: Monday, April 02, 2007 4:16 PM
> To: MySQL List
> Subject: UPDATE / not UPDATE??
>
> 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]
>
>
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]