早教吧作业答案频道 -->数学-->
todate外面套用decode后值发生变化selectdecode('99990828',null,null,todate('99990828','yyyymmdd'))a,todate('99990828','yyyymmdd')bfromdual;查询结果:28-8月-999999/8/28为什么套用decode的后就变成了1999年
题目详情
to_date外面套用decode后值发生变化
select decode('99990828',null,null,to_date('99990828','yyyymmdd')) a,
to_date('99990828','yyyymmdd') b from dual;
查询结果:
28-8月 -99 9999/8/28
为什么套用decode的后就变成了1999年
select decode('99990828',null,null,to_date('99990828','yyyymmdd')) a,
to_date('99990828','yyyymmdd') b from dual;
查询结果:
28-8月 -99 9999/8/28
为什么套用decode的后就变成了1999年
▼优质解答
答案和解析
这个无法用decode函数,用case when 就可以,给你个例子吧%D%Aselect (case when (submittime > to_date('2011-1-1', 'yyyy-mm-dd') and submittime < to_date('2012-1-1', 'yyyy-mm-dd')) then '2011' else '其他' end) da,submittime %D%A from resultinfo%D%A意思是当日期在2011-1-1 和2012-1-1之间的输出2011,否则输出其他
看了todate外面套用decod...的网友还看了以下:
如果下一年各企业市场份额变化为A:36%,B.32%,C:16%,D.9%,E:7%。在测算市场集中 2020-05-19 …
牛乳中所含的不饱和脂肪酸约为A.1%B.2%C.3%D.5%E.8% 2020-06-04 …
修青藏铁路要测A.B两地的高度差,因地形情况,不易测出,我们在AB两点间找到合适的四个点,D.E. 2020-07-06 …
修青藏铁路要测A.B两地的高度差,因地形情况,不易测出,我们在AB两点间找到合适的四个点,D.E. 2020-07-06 …
分析下图家族中某种遗传病的系谱图,相关叙述中错误的是()A.Ⅱ3、Ⅱ4、Ⅱ5、Ⅱ6基因型相同B.该 2020-07-16 …
已知i+h=10g+c,f+d=f,10b+c+i=10c+d,10f+a+j=10f+e,11b* 2020-10-30 …
(2010•邯郸)字母A、B、C、D、E、F和数字1、9、9、3分别按以下变动次序发生变化:A、B、 2020-11-12 …
A、B、C、D、E五个队进行单循环赛,胜一场3分.负一场0分.平局各得1分.比赛结束后发现,A队2胜 2020-12-07 …
总体X的一组样本值为9.6、9.8、9.4,则可得总体X均值E(X)的点估计为————(A)9.4; 2020-12-31 …
js中的竖线是什么意思('GN="";81e(M,h){9(N!=""){7(N).r="Y"}9( 2021-02-04 …