I have a table of payroll calendar dates which includes biweekly records ranging from 1/1/2010 through 12/31/2020. The fields are:
I need to store the Beginning and Ending dates to @Beg and @End variables when dateadd(day, -1,getdate()) is greater than or equal to the BeginningDate and Less than or equal to the EndingDate in the record.
I am having trouble writing the query when getdate() = the ending date.
Can someone help?