Robert writes "I am trying to use a user defined function where I search for double quotes (") and replace with a space. I am trying to use LEFT and RIGHT functions in conjunction with patindex and LEN. However it seems that LEN(string) stops counting when it finds double quotes. Can you give me some insight? Help, please.Example:create function Remove_Quotes(@Str char(100))returns char(100)As begin if @Str <> '' Begin while(patindex('%"%',@Str)<>0) set @Str = left(@Str,patindex('%"%',@Str)-1)+' '+ right(@Str,len(@Str)-patindex('%"%',@Str)) end return(@Str)end"