• Hi Grant,

    So Nice to hear from you....can't believe this..that you are replying to my post....wooooow...!!!

    In last few days i read several of your articles, saw your photo...you have very good & in-depth tech knowledge...Nice to meet you.

    Regarding my question, yes i was using while loop.

    Select @TempDate = @StartDate

    If Object_Id('#ReportDate') Is Null

    BEGIN

    Create Table #ReportDate

    (

    Id Int Identity(1, 1)

    ,ReportDate Date

    )

    END

    While @TempDate <= @EndDate

    Begin

    Insert Into #ReportDate(ReportDate)

    Select@TempDate

    Select @TempDate = Dateadd(DD, 1, @TempDate)

    End

    So execution plan was showing Query plan for each iteration of While loop.

    So when i go above date range of 1 Yr....i was facing this issue.

    so for now...just to move ahead in solving problem...i created Regular DB based table...and moved ahead. so this 241 plan problem is solved for now...

    But thank you very much for replying me.

    Would like to meet you soon...

    Sincerely

    Devsql