Is Not a Recognized Built-in Function Name

Created a function

CREATE FUNCTION Split_On_Upper_Case(@Temp VARCHAR(1000))
RETURNS VARCHAR(1000)
AS
BEGIN
DECLARE @KeepValues AS VARCHAR(50)
SET @KeepValues='%[^ ][A-Z]%'
WHILE PATINDEX(@KeepValues COLLATE Latin1_General_Bin,@Temp)>0
SET @Temp=STUFF(@Temp,PATINDEX(@KeepValues COLLATE Latin1_General_Bin,@Temp)+1,0,' ')
RETURN @Temp
END

When iam trying to exexute this SELECT Split_On_Upper_Case('SaiBharath') It gives an error "'Split_On_Upper_Case' is not a recognized built-in function name.".Can someone please explain this

1

3 Answers

Add [dbo] in prefix and then execute as same :

SELECT [dbo].[Split_On_Upper_Case] ('SaiBharath')
4

To execute function in sql, prefix dbo should be used.

SELECT [dbo].[Split_On_Upper_Case] ('SaiBharath')
0

Just to make sure, set the database you created your function on first by using the use clause and then prefix the call of your function with dbo.

USE <DatabaseName>

SELECT dbo.Split_On_Upper_Case('camelCase')

Also, a good practice is prefixing each function or database object for that matter, with its schema name.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest