Re: Copying seasonprices to next year
Posted by:
Tito St
Date: June 27, 2021 08:00AM
It almost works...
To substract 1 day from the date I added
insert into season_table
select
Null,
house,
date( concat( 2022, substr(date_to-1,5) ) ), -- added -1 to subtract 1 day
date( concat( 2022, substr(date_to-1,5) ) ), -- added -1 to subtract 1 day
price
from season_table
where year(date_from)=2021;
It works, but NOT for an original date that has a 01 as a day number
Examples:
2021-01-01 -> Null in stead of 2021-12-31
2021-05-01 -> Null in stead of 2022-04-30
Subject
Written By
Posted
Re: Copying seasonprices to next year
June 27, 2021 08:00AM
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.