Create function dbo.fnSplit_Vehicle (@sInputList varchar(100), @sDelimiter varchar(1)) returns varchar(100) --select dbo.fnSplit_Vehicle ('1234 abcd', '-') AS BEGIN Declare @Domain varchar(100) set @Domain = RTRIM(LTRIM(SUBSTRING(@sInputList,1,CHARINDEX(@sDelimiter,@sInputList,0)-1))) return @Domain End
Msg 537, Level 16, State 2, Line 1 Invalid length parameter passed to the LEFT or SUBSTRING function.
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)