• Looks to me like the problem might be with your Inner Join:

    FROM Table t

    Inner Join Table1 t1

    On

       T.HIDDateTime = T1.HIDDateTime

    WHERE (T.HIDDateTime BETWEEN @FromDate_LU AND @ToDate_LU)

    This might work a lot better for you.


    Butch