Search and Replace Byte Order Mark In Sql Server -
i have 10 table , more 10000 record contain  how can search  , replace in db? since  equal 0xef,0xbb,0xbf how can search this?
i use code
foo(myvarbincolumn) ( select text bpm_letters ) select * foo convert(varchar(max), myvarbincolumn) collate arabic_ci_as '%' + convert(nvarchar(max), char(0xef)+char(0xbb)+char(0xbf)) + '%' i found code in stackoverflow s incomplete.
script of bpm_letters code not find record! please me
what cte:
stripbom ( select case when left(text,3) = 0xefbbbf convert(varbinary(max),substring(text, 4, len(text))) else text end text bpm_letters ) it should provide new table bom characters have been stripped off.
p.s. code assumes 'text' field of type varbinary.
Comments
Post a Comment