Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Stored Procedure please Help

Author  Topic 

ReLski
Starting Member

5 Posts

Posted - 2011-01-13 : 08:54:29
EmployeeID|LeaveFrom|LeaveTo
0056 |8/9/2010 |8/15/2010
| |

I want get the range of this fields that will be something like this:
8/9/2010
8/10/2010
8/11/2010
8/12/2010
8/13/2010
8/14/2010
8/15/2010

and then compare this list of dates to column 'LogDate' of this table
EmployeeID|LogDate |
0056 |8/9/2010 |
0056 |8/10/2010|

if the list of dates is equal to 'LogDate' then
Set @TotalDeduction = 0

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-01-13 : 10:40:09
see

http://visakhm.blogspot.com/2010/02/generating-calendar-table.html

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -