MySQL Forums
Forum List  »  Newbie

Re: update inner join
Posted by: Peter Brawley
Date: March 22, 2018 11:34AM

Camel case table & column names will bite you if the db ever finds itself on Linux. Usually best to stick to lower case names.

Is this what you mean?

update temprevenue as t
join (
  select servno, sum (charge) as chargesum
  from records
  where left(recdate,4) = '2017' 
  group by servno
) as r using( servno )
set t.revenue = r.chargesum;

Options: ReplyQuote


Subject
Written By
Posted
March 22, 2018 07:47AM
Re: update inner join
March 22, 2018 11:34AM
March 23, 2018 05:11PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.