I need some MS-SQL query or stored procedure that lists the number of workdays given two inputs: 1) Timeperiods (From, To) 2) Misc. Holiday Dates Example Input: Table 1: Vacation: varchar DateFrom: datetime DateTo: datetime sample record: vacation, datefrom, dateto xmas-vacation, 2009-12-21, 2009-12-27 Table 2: HolidayDesc: varchar HolidayDate: datetime sample record: holidaydesc, holidaydate xmas-1, 2009-12-25 xmas-2, 2009-12-26 Expected result should be a table containing all workdays of the period from table 1 (e.g. no sat and sun) and excluding the dates from table 2 that fall into the period. Result Table: Desc: varchar Date: datetime Sample Result Desc, Date x-mas vacation, 2009-12-21 x-mas vacation, 2009-12-22 x-mas vacation, 2009-12-23 x-mas vacation, 2009-12-24
1) Complete and fully-functional working program(s) in complete source code of all work done.
2) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).