MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.
ALTER FUNCTION [dbo].[charcheck] (@hs1 nvarchar(100),@hs2 nvarchar(100)) RETURNS numeric(5,2) AS BEGIN declare @l1 as int,@l2 as int,@p1 int declare @r1 as nvarchar(100),@r2 as nvarchar(100) set @l1=len(@hs1) set @l2=len(@hs2) set @r1=@hs1 set @r2=@hs2 declare @i as int declare @rst as int set @i=1 while @i <= @l2 begin set @p1=charindex(substring(@hs2,@i,1),@r1) if @p1>0 set @r1=stuff(@r1,@p1,1,'') set @i=@i+1 end set @rst=len(@r1) set @i=1 while @i <= @l1 begin set @p1=charindex(substring(@hs1,@i,1),@r2) if @p1>0 set @r2=stuff(@r2,@p1,1,'') set @i=@i+1 end set @rst=@rst+len(@r2) declare @retval as numeric(5,2) declare @som2 as numeric(5,2) set @som2=cast((@l1+@l2) as numeric(5,2)) set @retval=((@l1+@l2-@rst)/@som2)*100 return @Retval end
|Error on Add method||1||49|
|Using C#, how could you improve upon my method of writing out a merged, compressed file?||2||45|
|Windows Media Player||2||26|
|VB.NET 2008 - SQL Timeout||9||22|
Join the community of 500,000 technology professionals and ask your questions.
Connect with top rated Experts
12 Experts available now in Live!