rootfixxxer (1/17/2013)
Never used ITVF before, so how do i replace my function by the ITVF? 😀
without the code i mentioned previously, it's really hard to guess;
since i cannot test this, it might give you an idea;
you use a CROSS APPLY with an ITVF:
UPDATE MyTable
SET
MyTable.qt = @qtDay + qt,
MyTable.ids = ids + ',' + CAST(@id AS NVARCHAR(15))
FROM @TableDates MyTable
CROSS APPLY dbo.CheckDayType_ITVF(DATEADD(DAY,N-1,dt)) myfn
WHERE pac = @pac
AND myfn = 0
Lowell