sql server - How to search multiple strings or chars in a field in sql -


I am using sql server and i have a table with two fields

    < Li>
  1. Description

    I want to select all the rows containing the following strings

    ('$', ' I am using it like this:

      Select the name, description from table_name where there is any way Details of ('% $%', '% [%]   

    now giving error when I run it

      Incorrect syntax keyword 'any'   

    Thanks,

    if You have many patterns pattern stored on To include the derived table or temporary table code> announcement @bugger table (pattern VARCHAR (20)); Patterns value ('% $%'), ( '% [%]%'), ('% AC cd%'); SELECT a. * Add a comment from the table_name @ Patterns P On (A. P. Pattern like a description);

    To compare multiple columns, simply add the expression from ON section

      SELECT a.). @ Patterns P On (A.S.A.L.P.P. Pete Tern) or (A.P.Parten, like A. Column 2); Update    
      as pattern pattern (select 'Association'% ('% Device%') Select All '% Sales% Select 'Select Union'% AC CD% ') Select. * From a table_name to a join pattern P (a.Description LIKE p.pattern) GO   

    did not test but you can do this

    < / Div>

Comments

Popular posts from this blog

excel vba - How to delete Solver(SOLVER.XLAM) code -

github - Teamcity & Git - PR merge builds - anyway to get HEAD commit hash? -

ios - Replace text in UITextView run slowly -