I have a Sales table where I load data since 2021. but I am trying to split this and running the full load on Saturdays. Other days will run only the current year data and concat with the previous one. Below is the one I am looking for. Please let me know if this makes sense.
QVD 1
IF (Saturday run the below)
Select * from Sales where sales_date < sysdate - 365
store into QVD
Main QVD
QVD 1
Concat
Select * from Sales where sales_date >= sysdate - 365