Need a unique gift idea?
A Pastebin account makes a great Christmas gift


a guest Oct 12th, 2018 64 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. cross apply (SELECT
  2.       sum(case when [day] between @FirstDay and @LastDay then 1 else 0 end) as UsedDays
  3.                  FROM Calendar c
  4.         WHERE ([day] >=  r.[DateFrom]   AND [day] <= r.[DateTo] AND [WorkDay] = 1))calculateUsedDays
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand