Advertisement
yuvarajupadhyaya

if condition in where clause

May 17th, 2022
2,525
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. WHERE OrderNumber LIKE
  2.   CASE WHEN IsNumeric(@OrderNumber) = 1 THEN
  3.     @OrderNumber
  4.   ELSE
  5.     '%' + @OrderNumber
  6.   END
Advertisement
RAW Paste Data Copied
Advertisement