当前位置:网站首页>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>
边栏推荐
- Technology dry goods | luxe model for the migration of mindspore NLP model -- reading comprehension task
- 【LeetCode】3. Merge two sorted lists · merge two ordered linked lists
- 华为S5700交换机初始化和配置SSH和TELNET远程登录方法
- 技术干货|昇思MindSpore创新模型EPP-MVSNet-高精高效的三维重建
- 华为交换机基础配置(telnet/ssh登录)
- 項目經驗分享:實現一個昇思MindSpore 圖層 IR 融合優化 pass
- Huawei switch: configure Telnet, SSH and web access
- PAT甲级 1032 Sharing
- The difference between hdmi2.1 and hdmi2.0 and the conversion of PD signals.
- Project experience sharing: handwritten Chinese character recognition based on Shengsi mindspire
猜你喜欢

Pat grade a 1029 median

Worldview satellite remote sensing image data / meter resolution remote sensing image

Pycharm remote ssh pyenv error: pydev debugger: warning: trying to add breakpoint to file that does

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

Technical dry goods | hundred lines of code to write Bert, Shengsi mindspire ability reward

Go language foundation ------ 12 ------ JSON

Partage de l'expérience du projet: mise en œuvre d'un pass optimisé pour la fusion IR de la couche mindstore

【MindSpore论文精讲】AAAI长尾问题中训练技巧的总结

Technical dry goods | Bert model for the migration of mindspore NLP model - text matching task (2): training and evaluation

【踩坑系列】mysql 修改root密码失败
随机推荐
LwIP learning socket (application)
Iterm2设置
一篇文章让你读懂-曼彻斯特编码
Professor Zhang Yang of the University of Michigan is employed as a visiting professor of Shanghai Jiaotong University, China (picture)
PIP uses image website to solve the problem of slow network speed
Technical dry goods | alphafold/ rosettafold open source reproduction (2) - alphafold process analysis and training Construction
Pat class a 1032 sharing
HDMI2.1与HDMI2.0的区别以及转换PD信号。
Go language foundation ----- 03 ----- process control, function, value transfer, reference transfer, defer function
go语言-循环语句
Register keyword
技术干货|昇思MindSpore NLP模型迁移之Bert模型—文本匹配任务(二):训练和评估
Go language foundation ----- 18 ----- collaboration security, mutex lock, read-write lock, anonymous lock, sync Once
Technical dry goods | some thoughts on the future of AI architecture
Quelle est la définition? Qu'est - ce qu'une déclaration? Quelle est la différence?
[MySQL 12] MySQL 8.0.18 reinitialization
[mindspire paper presentation] summary of training skills in AAAI long tail problem
Technical dry goods | reproduce iccv2021 best paper swing transformer with Shengsi mindspire
Project experience sharing: Based on mindspore, the acoustic model is realized by using dfcnn and CTC loss function
Robots protocol