惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
C
CERT Recently Published Vulnerability Notes
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed
Security Latest
Security Latest
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
AI
AI
Cisco Talos Blog
Cisco Talos Blog
K
Kaspersky official blog
S
Secure Thoughts
PCI Perspectives
PCI Perspectives
Simon Willison's Weblog
Simon Willison's Weblog
D
DataBreaches.Net
GbyAI
GbyAI
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
大猫的无限游戏
大猫的无限游戏
T
Tailwind CSS Blog
The Cloudflare Blog
阮一峰的网络日志
阮一峰的网络日志
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
罗磊的独立博客
V
Visual Studio Blog
aimingoo的专栏
aimingoo的专栏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
IT之家
IT之家
V
V2EX
Last Week in AI
Last Week in AI
有赞技术团队
有赞技术团队
月光博客
月光博客
酷 壳 – CoolShell
酷 壳 – CoolShell
T
Tenable Blog
T
Threat Research - Cisco Blogs
T
Troy Hunt's Blog
V2EX - 技术
V2EX - 技术
S
Security @ Cisco Blogs
Security Archives - TechRepublic
Security Archives - TechRepublic
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
L
Lohrmann on Cybersecurity
F
Full Disclosure
H
Help Net Security
博客园 - Franky
Stack Overflow Blog
Stack Overflow Blog
N
Netflix TechBlog - Medium
Engineering at Meta
Engineering at Meta
A
Arctic Wolf
O
OpenAI News
S
Securelist

博客园 - xiazhaoxia

关于《会员专区》项目经验分享 dell的1501和640m,买哪个好呢? 数码相机成像好坏的关键?! 我要试试洋酒! 我爱网购! DataGrid数据导出到Excel You are my everything Remeber me by 李孝利 致力于blog的新衣服 datagrid小tip(三):导入Excel的问题?! datagrid小tip(二):拼接多层表头 datagrid小tip(一):鼠标的移动和点击变色 相对路径or绝对路径? DataGrid的动态绑定问题(二) 续 oracle中的联合主键查询问题! DataGrid的动态绑定问题(二) __doPostBack()无效 ? 屏蔽页面刷新功能 asp.net学习点滴
关于oracle中的去除null和空格的问题
xiazhaoxia · 2007-02-15 · via 博客园 - xiazhaoxia

(length(trim(cbkssj)) is null
这个语句应该只适用于oracle的奇怪情况,判断length等于null?!

除了这个以外奉送一条满强的sql语法,里面有很多的or和and,经过这次的经验,我发现如果写错了or和and会增加语句的难度.

已知:有两个时间字段,kssj和jssj,如果都为空则算全年,其他即使大于kssj的,算以后的时间.小于jssj的算今年开始至结束时间的.

最后的语句:
 where ((length(trim(cbkssj)) is null and
                               (length(trim(cbjssj)) is null or
                               substr(trim(cbjssj), 1, 6) >= v_yf)) or
                               (substr(trim(cbkssj), 1, 6) <= v_yf and
                               (length(trim(cbjssj)) is null or
                               substr(trim(cbjssj), 1, 6) >= v_yf)))) t1,

posted on 2007-02-15 10:50  xiazhaoxia  阅读(2561)  评论()    收藏  举报