Dear All,I need a query to view the dates between start date and end date, for this I had following tables:Table Name:- Calender-----------------------Date | Holiday-----------------------2011-04-11 | False2011-04-12 | False2011-04-13 | False2011-04-14 | False2011-04-15 | False2011-04-16 | False2011-04-17 | True2011-04-18 | False2011-04-19 | False2011-04-20 | False-----------------------
Table Name:- Project--------------------------------PrjID | StartDate | EndDate-------------------------------- 1 | 2011-04-11 | 2011-04-18 2 | 2011-04-16 | 2011-04-19 --------------------------------
Now I want a T-SQL which will generate following result based on above tables:----------------------------------------------PrjID | StartDate | EndDate | Dates---------------------------------------------- 1 | 2011-04-11 | 2011-04-18 | 2011-04-11 1 | 2011-04-11 | 2011-04-18 | 2011-04-11 1 | 2011-04-11 | 2011-04-18 | 2011-04-11 1 | 2011-04-11 | 2011-04-18 | 2011-04-11 1 | 2011-04-11 | 2011-04-18 | 2011-04-11 1 | 2011-04-11 | 2011-04-18 | 2011-04-11 1 | 2011-04-11 | 2011-04-18 | 2011-04-18 1 | 2011-04-11 | 2011-04-18 | 2011-04-19 2 | 2011-04-16 | 2011-04-19 | 2011-04-16 2 | 2011-04-16 | 2011-04-19 | 2011-04-18 2 | 2011-04-16 | 2011-04-19 | 2011-04-19 2 | 2011-04-16 | 2011-04-19 | 2011-04-20----------------------------------------------
here you can see, 2011-04-17 is not being considered as it's holiday status in Calender is TRUE. The T-SQL should only consider those dates whose holiday status is False.Thanks in advance!Regards,DaipayanSoftware Programmer
Application has reported a 'Not My Fault' in module KRNL.EXE in line 0200:103F