Posted on: 9/9/2014 4:12:27 PM | Views : 548

Below are the functions:
         create function dbo.BuildRecordKey (@str
RefID as nvarchar(500), @strRetID as nvarchar(500), @strFName as nvarchar(500),  @strLName as nvarchar(500), @strZIPorPolType as nvarchar(500), @strKeyMode as nvarchar(500))  returns nvarchar(500)   AS begin   --define variables declare @strTempString nvarchar(500) --initiate values set @strKeyMode = upper(@strKeyMode) --Determine if we are looking for numeric values only or numbers and letters SET @strTempString = case  WHEN @strKeyMode IN ('AUTO/CYCLE', 'CYCLE', 'COMMERCIAL') THEN  @strRefID + '|' + @strRetID end SET @strFName = cas ...

Go to the complete details ...