July 27, 2022 at 12:00 am
Comments posted to this topic are about the item The Broken UDF
July 27, 2022 at 7:21 am
Hi Steve
Just had a look at todays question and it appears the error message is missing so you can't try to pick the correct answer.
Am I missing something?
Regards
Richard
July 27, 2022 at 9:51 am
I have this code on SQL Server 2017:CREATE FUNCTION AddOne
(@i INT)
RETURNS INT
AS
BEGIN
DECLARE @result INT;
SELECT @result = @i + 1;
RETURN @result;
END;
GO
SELECT AddOne(3)
When I execute this, I get the following error: Msg 195, Level 15, State 10, Line 11 'AddOne' is not a recognized built-in function name. What is wrong?
(From the email)
July 27, 2022 at 10:24 am
Thanks for that.
In Chrome, I don't get the "Msg 195, Level 15, State 10, Line 11 'AddOne' is not a recognized built-in function name." bit.
Regards
Richard
July 27, 2022 at 1:54 pm
That's what I get in 2019. Don't have a instance of 2017 loaded to see if it's the same.
July 27, 2022 at 2:32 pm
Weird, the error is in the question editor, but not showing on the site. I've reformatted it to appear.
The issue is a UDF requires a two part name.
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply