TSQL. How do you remove all the control symbols?



  • How can you remove all the symbol managers?

    The following request shall be used to find such records:

    select * from MyTable
    where 
        TextField  LIKE '%[' + char(1)+ '-' + char(8) +']%'
        or TextField  LIKE '%[' +  char(10)+ '-' + char(31) +']%'
    

    You can make REPLACE for every symbol, but it's not good.



  • Good afternoon, look for the following functions: https://github.com/ktaranov/sqlserver-kit/blob/master/User_Defined_Function/udf_PatExclude8K.sql and https://github.com/ktaranov/sqlserver-kit/blob/master/User_Defined_Function/RemoveNonAlphaCharacters.sql

    Either https://msdn.microsoft.com/en-us/library/ms254498(v=vs.130).aspx (if the organization ' s security policy allows) with the full support of C# regular expressions: http://www.sqlsharp.com/




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2