Home Forums SQL Server 2005 T-SQL (SS2K5) help-how to generate date backward from end to start RE: help-how to generate date backward from end to start

  • tnx for the help

    how can i use al, the help and put it in this part of code

    while

    @@Fetch_Status = 0

    begin

    -- loop to insert info of emp shifts

    while

    @current<=@EndDate ----------------generate date from END to START ?

    begin

    INSERT INTO @empShifts ([empID],[ShiftDate],[ShiftType],[StartDate] ,[EndDate])

    select @input_empID ,@current,shift .patternShiftValue ,@StartDate,@EndDate

    from @shifts_pattern as shift where PatternId=@last_shift_id+1