Run tool create_udf

Back

Description

create a user defined function. The parameter is the function like in this example:
CREATE function [dbo].[FirstContract](@MasterContractID varchar(38))
RETURNS uniqueidentifier
begin
declare @rslt uniqueidentifier
set @rslt = (select top 1 contractID
from contract
where MasterContractID = @MasterContractID
order by FirstDay, LastDay )
return @rslt
end

It will convert this function in sql stament that can be run inside a db maintain runtine

Category: SQL

Author: edilio

Please, enter params:

Result