We need a date range capability added to a SQL Server 2000 Stored Procedure (sp_IntelReport) from the attached database. It needs to do the following: Restrict selection from tblBookings on Booking_Start field if any of the following are true: 1. if Quarter_ID not equal to Zero then: Look up the record in tblQuarters. Take the Quarter_Number (1 - 4) and Year values. It should use these values to set the date range. iStart_Month (1-12) tells it which month the year starts on. So for example, if iStartMonth is 4 (April) and Quarter_Number is 1 and Year is 2003 then the date range would be: >= April 1st 2003 and < July 1st 2003 2. Otherwise, if iYear_ID other zero then it again needs to look at iStartMonth. If Year is 2003, and iStartMonth is 4 then the range would be >=April 1st 2003 and
1) Complete and fully-functional stored procedure 2) Complete ownership and distribution copyrights to all work purchased.
SQL Server 2000