• Thanks

    I was using the CROSS APPLY, but to test i was using the GETDATE that returns date and time so the ITVF doesn't returned anything... :Whistling:

    The all procedure now takes 3 seconds 🙂

    Thanks a lot.