MySQL Forums
Forum List  »  Newbie

Re: Copying seasonprices to next year
Posted by: Peter Brawley
Date: June 24, 2021 09:37AM

Not a database.

A table.

Is this what you mean?

insert into the_table_name
select 
  id, 
  house, 
  date( concat( 2022, substr(date_from,5) ) ), 
  date( concat( 2022, substr(date_to,5) ) ),
  price
  from the_table_name
  where year(date_from)=2021;

Options: ReplyQuote


Subject
Written By
Posted
Re: Copying seasonprices to next year
June 24, 2021 09:37AM


Sorry, only registered users may post in this forum.

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.