hi am beginner of SQL ,
i hav some doubt in SQL Query Between Command..
i want to calculate two dates using between command..
example of the Query is:
SELECT LI.EmpId,EOS.Emp_Name,DS.Description,SUM(convert(i nt, DateDiff (Day,'10/03/2007','11/11/2007'))+1)
as Leave,LS.NoOfLeaves, (LS.NoOfLeaves -SUM((convert(int, DateDiff (Day,'10/03/2007' , '11/10/2007'))+1)))
as Balance FROM
LEAVEINFO LI,EMPLOYEEOFFICIALSETUP as EOS,DESGSETUP as DS, LEAVESETUP LS
WHERE(LI.EmpId=EOS.EmpId AND EOS.DESIGCODE=DS.DESGCODE AND DS.DESGCODE='007 ' AND EOS.EmpId='E0002' ) AND
LS.NOOFLEAVES=(select NoofLeaves From LeaveSetup where EnteredDate=(select Max(EnteredDate) from LeaveSetup as e
where EnteredDate=e.EnteredDate))
GROUP BY LS.NOOFLEAVES,LI.EmpId,EOS.Emp_Name,DS.Description