Search
 
SCRIPT & CODE EXAMPLE
 

SQL

t-sql conditional order by multiple columns

SELECT * FROM dbo.Employee
ORDER BY 
 CASE WHEN Gender='Male' THEN EmployeeName END Desc,
 CASE WHEN Gender='Female' THEN Country END ASC
Comment

PREVIOUS NEXT
Code Example
Sql :: cross apply top for each row t1 
Sql :: java nosql sort 
Sql :: print orcale 
Sql :: difference between cross apply and inner join 
Sql :: mysql sum per week 
Sql :: Which MySQL statement is used to delete data from a database 
Sql :: titlecase in sql 
Sql :: denormalise SQL command 
Sql :: tsql select concatenated values in one to many relationship 
Sql :: mysql read row 
Sql :: sqlite date to char 
Sql :: sql server setup commands 
Sql :: hacer un programa en python ingresar números enteros determine el maximo 
Sql :: python mysql github 
Sql :: Oracle Function call - 12C 
Sql :: how to do a function to return row type from a table in pl/sql 
Sql :: like date sql server not working 
Sql :: uninstall mysql centos 7 
Sql :: power bi connect to postgresql 
Sql :: employee name starting with in sql 
Sql :: error E11000 
Sql :: sql datediff db2 
Sql :: group function in sql 
Sql :: modificar tipo de dato sql server 
Sql :: delete sql server store procedure 
Sql :: parsing float to int in mysql 
Sql :: timing sql queries 
Csharp :: raycast from camera to mouse unity 
Csharp :: c# open web page in default browser 
Csharp :: unity how to refrsh scene 
ADD CONTENT
Topic
Content
Source link
Name
8+9 =