hi i have a goals want to generate list of date between 2 date but i also have some condition like this :
Table_A : Maximum Delivery Time and Week off
Code Max_delivery_time Week_off
01 4 6
Note : Maximum_delivery_time it contains the number of day that we can deliver an item week_off it contains the day in every week that deliver can't be process values 1-7 1 = monday, 2 = tuesday etc
Table_B : Table Day off
Code Date_day_off
01 2021-26-05
02 2021-28-05
Table B contains date day off that must be exclude if the day is on range
so i would like to select list of the date inside the date range with condition : date start must be +1 day from today date finish is (sysdate+1) + "Max_delivery_time". But if the day inside is contains a day in Week_off and date from table b date_day_off it will change to next day sample : Today is : monday, 2021-05-24
the result will be
List_of_day
2021-05-25
2021-05-27
2021-05-30
2021-05-31
is it possible to generate it with a query ?
select version();show?Table_A- does it contains 1 row only? 1 = monday, 2 = tuesday etc Why so strange? Why not like for WEEKDAY() function (0 = Monday, 1 = Tuesday, … 6 = Sunday).Table_B- incorrect date literals. the result will be Why '2021-05-31' is skipped?