The Stack Overflow podcast is back! Listen to an interview with our new CEO.

New answers tagged

1

A before insert trigger might be an option... However, a "dates table" aka "calendar table" is much more flexible, regardless of the DBMS you are using. Basically, it's a pre-generated table of dates from say 1900-01-01 to 2200-12-31. In addition to various date columsn, it would contain various flag columns (weekday, weekend, holiday) and other helpful ...


Top 50 recent answers are included