Alter a SQL server function to accept new optional parameter

后端 未结 3 1666
Happy的楠姐
Happy的楠姐 2020-12-05 01:14

I already have a function in SQL Server 2005 as:

ALTER function [dbo].[fCalculateEstimateDate] (@vWorkOrderID numeric)
Returns varchar(100)  AS
Begin
  

        
3条回答
  •  盖世英雄少女心
    2020-12-05 01:50

    I have found the EXECUTE command as suggested here T-SQL - function with default parameters to work well. With this approach there is no 'DEFAULT' needed when calling the function, you just omit the parameter as you would with a stored procedure.

提交回复
热议问题