当前位置:网站首页>Usage of (case, when) in PostgreSQL
Usage of (case, when) in PostgreSQL
2022-07-03 07:50:00 【A reserved and calm man】
1.case when
(
case
when substr(starttime::varchar,0,5)='2020' then '2020 year '
when substr(starttime::varchar,0,5)='2019' then '2019 year '
when substr(starttime::varchar,0,5)='2018' then '2018 year '
when substr(starttime::varchar,0,5)='2017' then '2017 year '
when substr(starttime::varchar,0,5)='2016' then '2016 year '
when substr(starttime::varchar,0,5)='2015' then '2015 year '
when substr(starttime::varchar,0,5)='2014' then '2014 year '
when substr(starttime::varchar,0,5)='2013' then '2013 year '
when substr(starttime::varchar,0,5)='2012' then '2012 year '
when substr(starttime::varchar,0,5)='2011' then '2011 year '
when substr(starttime::varchar,0,5)='2010' then '2010 year '
when starttime is null then ' Other years ' end
) AS year
2.mybatis To determine whether a parameter is empty
<if test="geojsonString !=null and geojsonString !=''">
WHERE
st_intersects(geom,st_geomfromgeojson(#{
geojsonString}))
</if>
边栏推荐
- Go language foundation ----- 03 ----- process control, function, value transfer, reference transfer, defer function
- Pycharm remote ssh pyenv error: pydev debugger: warning: trying to add breakpoint to file that does
- Technical dry goods Shengsi mindspire elementary course online: from basic concepts to practical operation, 1 hour to start!
- PDO and SDO concepts
- Technical dry goods | Bert model for the migration of mindspore NLP model - text matching task (2): training and evaluation
- 基于RNA的新型癌症疗法介绍
- Go language foundation ----- 01 ----- go language features
- [MySQL 12] MySQL 8.0.18 reinitialization
- 项目经验分享:基于昇思MindSpore,使用DFCNN和CTC损失函数的声学模型实现
- Iterm2设置
猜你喜欢

Harmonyos third training notes

PAT甲级 1032 Sharing

技术干货|百行代码写BERT,昇思MindSpore能力大赏

UA camouflage, get and post in requests carry parameters to obtain JSON format content

技术干货|昇思MindSpore NLP模型迁移之LUKE模型——阅读理解任务

PAT甲级 1029 Median

一篇文章让你读懂-曼彻斯特编码

Analysis of the problems of the 7th Blue Bridge Cup single chip microcomputer provincial competition

Usage of requests module

Partage de l'expérience du projet: mise en œuvre d'un pass optimisé pour la fusion IR de la couche mindstore
随机推荐
华为交换机Console密码重置、设备初始化、默认密码
An article for you to understand - Manchester code
OSPF experiment
Partage de l'expérience du projet: mise en œuvre d'un pass optimisé pour la fusion IR de la couche mindstore
yarn link 是如何帮助开发者对 NPM 包进行 debug 的?
Redis batch startup and shutdown script
PAT甲级 1030 Travel Plan
Robots protocol
Redis批量启停脚本
Technical dry goods Shengsi mindspire lite1.5 feature release, bringing a new end-to-end AI experience
Go language foundation ----- 08 ----- interface
Go language foundation ----- 11 ----- regular expression
What is definition? What is a statement? What is the difference between them?
什么是数据类型?数据类型有什么用?
Professor Zhang Yang of the University of Michigan is employed as a visiting professor of Shanghai Jiaotong University, China (picture)
技术干货|昇思MindSpore创新模型EPP-MVSNet-高精高效的三维重建
技术干货|利用昇思MindSpore复现ICCV2021 Best Paper Swin Transformer
Structure of golang
Project experience sharing: handwritten Chinese character recognition based on Shengsi mindspire
优质博客——