sqlserver 中的转换函数
发布时间:2020-12-12 16:07:36 所属栏目:MsSql教程 来源:网络整理
导读:select (case a.handleUser when 'admin' then '1' else '0' end) AS idHandUser, (case a.appayUser when 'admin' then '1' else '0' end) AS idapplyUser, a.*,CONVERT(varchar(100),applyTime,102) as ATime? from cutchargeflow a where a.status =1 and
select (case a.handleUser when 'admin' then '1' else '0' end) AS idHandUser, (case a.appayUser when 'admin' then '1' else '0' end) AS idapplyUser, a.*,CONVERT(varchar(100),applyTime,102) as ATime? from cutchargeflow a where a.status =1 and a.handleUser ='admin' or a.appayUser = 'admin' 日期的比较 select * from T_cutchargeflow where cast(CONVERT(varchar,applyTime)as datetime)? between cast(CONVERT(varchar,'2011-7-1')as datetime) and cast(CONVERT(varchar,'2013-08-19')as datetime)? (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |