当前位置:网站首页>How to sort multiple fields and multiple values in sql statement
How to sort multiple fields and multiple values in sql statement
2022-08-05 02:47:00 【CSDN Q&A】
How to sort multiple fields and multiple values in SQL statement?The requirement is to query all the lists, and then sort them according to the origin and destination. I use the case when syntax to always report an error
sql statement as follows
select swco.id,swco.order_type,swco.goods_type_id,swco.departure,swco.bounty,swco.goods_number,swco.goods_name,swco.destination,swco.goods_value,swco.goods_weight,swco.order_status,swco.end_time,swco.start_time from sys_we_chat_order swco where swco.deleted =0 order by case when departure ='Beijing' and destination ='Hengshui' then 'Beijing' when departure ='Beijing' then 'Hengshui' when destination ='Hengshui' then 'Hengshui', swco.create_time desc The error message is as follows

Is there anything wrong with this, or how to implement it in other ways
边栏推荐
- Matlab画图3
- Introduction to SDC
- 优炫数据库的单节点如何转集群
- Apache DolphinScheduler, a new generation of distributed workflow task scheduling platform in practice - Medium
- Syntax basics (variables, input and output, expressions and sequential statement completion)
- 百日刷题计划 ———— DAY2
- 【OpenCV 图像处理2】:OpenCV 基础知识
- 从零到一快速学会三子棋
- 剑指offer专项突击版第20天
- 解决端口占用问题 Port xxxx was already in use
猜你喜欢

2022-08-04: Input: deduplicated array arr, the numbers in it only contain 0~9.limit, a number.Return: The maximum number that can be spelled out with arr if the requirement is smaller than limit.from

View handler 踩坑记录

tree table lookup

OpenGL 工作原理
![Tencent Cloud [Hiflow] New Era Automation Tool](/img/ac/5c61424f22cd9fed74dcd529fdb6a4.png)
Tencent Cloud [Hiflow] New Era Automation Tool
![[LeetCode Brush Questions] - Sum of Numbers topic (more topics to be added)](/img/ee/6b52072c841af99488dc0c1141c74c.png)
[LeetCode Brush Questions] - Sum of Numbers topic (more topics to be added)

Optimizing the feed flow encountered obstacles, who helped Baidu break the "memory wall"?

基于左序遍历的数据存储实践

What should I do if the self-incrementing id of online MySQL is exhausted?

nodeJs--encapsulate routing
随机推荐
正则表达式,匹配中间的某一段字符串
C student management system Find student nodes based on student ID
Matlab drawing 3
[ROS](10)ROS通信 —— 服务(Service)通信
22-07-31周总结
shell语句修改txt文件或者sh文件
【OpenCV 图像处理2】:OpenCV 基础知识
post-study program
倒计时 2 天|云原生 Meetup 广州站,等你来!
QStyle platform style
The design idea of DMicro, the Go microservice development framework
DAY22: sqli-labs shooting range clearance wp (Less01~~Less20)
VSCode Change Default Terminal 如何修改vscode的默认terminal
DAY22:sqli-labs 靶场通关wp(Less01~~Less20)
[In-depth study of 4G/5G/6G topic-51]: URLLC-16-"3GPP URLLC related protocols, specifications, and technical principles in-depth interpretation"-11-High reliability technology-2-Link adaptive enhancem
Tencent Cloud [Hiflow] New Era Automation Tool
undo problem
QT:神奇QVarient
Syntax basics (variables, input and output, expressions and sequential statement completion)
你要的七夕文案,已为您整理好!