Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql if clause within where clause

WHERE OrderNumber LIKE
  CASE WHEN IsNumeric(@OrderNumber) = 1 THEN 
    @OrderNumber 
  ELSE
    '%' + @OrderNumber
  END
Comment

PREVIOUS NEXT
Code Example
Sql :: Postgres - Login and connect as default user 
Sql :: sql count unique values in one column 
Sql :: oracle apex debug time 
Sql :: mysql grant select update insert delete 
Sql :: get last 50 rows sql 
Sql :: round in sql server 
Sql :: postgre alter table foreign key 
Sql :: mysql age by birthdate 
Sql :: row to value to json in sql server 
Sql :: truncate all tables 
Sql :: remove foreign key constraints in postgres 
Sql :: mysql execute file 
Sql :: what is the difference between clustered and non-clustered index in sql server 
Sql :: sql set 
Sql :: get clob size oracle 
Sql :: mysql load sql from file 
Sql :: Index a database column sql 
Sql :: WHERE not regex in SQL 
Sql :: mysql: command not found 
Sql :: mysql url data type 
Sql :: sample in sql 
Sql :: activate binary log mariadb 
Sql :: how to count the number of rows in sql 
Sql :: NVL() Functions 
Sql :: rollback in sql 
Sql :: multiple replace value mssql 
Sql :: multiple count with where clause sql 
Sql :: postgres left join 
Sql :: table structure in sql 
Sql :: login failed for login due to trigger execution 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =