天天看点

Execution error: \'the function name is not a recognized built-in function name\'

sql server scalar user defined functions must be called with 2 part names. you need to write as username before function. 

so if your function name is "function1" and is defined in the dbo schema, then instead of 

"select function1()" you should call it as "select dbo.function1()" 

functions will run like below:

select dbo.avg(columns name) from (table_name) - returns the average value

select dbo.count(columns name) from (table_name) - returns the number of rows

select dbo.first(columns name) from (table_name) - returns the first value

select dbo.last(columns name) from (table_name) - returns the last value

select dbo.max(columns name) from (table_name) - returns the largest value

select dbo.min(columns name) from (table_name) - returns the smallest value

select dbo.sum(columns name) from (table_name) - returns the sum