November 30, 2015 at 12:37 pm
Comments posted to this topic are about the item Function for Getting Interval Dates by days,months,years.
December 9, 2015 at 6:30 am
Quite elaborate, thanks.
December 9, 2015 at 7:03 am
Failed on line 374.
December 9, 2015 at 9:53 am
Msg 213, Level 16, State 1, Procedure FunGetIntervalDates, Line 373
Column name or number of supplied values does not match table definition.
December 11, 2015 at 2:32 am
can you please tell me the passing values on function for which you are getting issues.
December 11, 2015 at 6:15 am
I did not run it, I was just compiling it when this error came up. It had to do with not having the same number of arguments in an insert.
April 25, 2016 at 4:50 pm
dlchase (12/11/2015)
I did not run it, I was just compiling it when this error came up. It had to do with not having the same number of arguments in an insert.
Thanks for the insight.
May 17, 2016 at 4:41 am
Change the Last Else part with given below script.
ELSE
BEGIN
INSERT @Table
SELECT @EntityId AS Value,
Rank()
OVER(
ORDER BY RecuringDATE) AS id,
Rank() OVER (
partition BY Datename(MM, RecuringDATE), Datename(yyyy, RecuringDATE), Datename(dw, RecuringDATE)
ORDER BY RecuringDATE) AS Label,
RecuringDATE,
Datename(MM, RecuringDATE) AS DayName,
Datename(dw, RecuringDATE) AS WeekName,
((SELECT Datepart(WEEK, RecuringDATE) - Datepart(WEEK, Dateadd(MM, Datediff(MM, 0, RecuringDATE), 0)) + 1)) AS Weeks,
Datename(yyyy, RecuringDATE) AS year
FROM @tempDATE
ORDER BY RecuringDate
END
RETURN;
Viewing 8 posts - 1 through 7 (of 7 total)
You must be logged in to reply to this topic. Login to reply