SQLite Forum

Use Recursive Date to test Holiday and Weekend and Update Record
Login
Here's an alternative using the [`generate_series`](https://sqlite.org/series.html) table-valued function:

```sql
UPDATE A
   SET scheduled = (SELECT Date(value)
                      FROM generate_series
                     WHERE start = JulianDay(A.scheduled)+1
                       AND strftime('%w', value) NOT IN ('0', '6')
                       AND Date(value) NOT IN Holidays);
```