遇的问题

1、sql日期转换报错

 

 

select ProductionDate,DeptName,BranchCode, BranchName,WorkshopCode,WorkshopName,item,HaltName, SUM(HaltPeriod) AS HaltPeriod 
, case bz when 'A' then '' when 'B' then '' when 'C' THEN '' end as BZ from bus_gtd
where valid='1' and  DeptName='炼铁事业部' and convert(varchar(10),ProductionDate,120) ='${GtoDate}'
group by ProductionDate,DeptName,BranchCode,BranchName,WorkshopCode,WorkshopName,BZ,item,HaltName
ORDER BY BranchCode,WorkshopCode,bus_gtd.BZ

sql 里将日期型转成字符型

posted on   michellexiaoqi  阅读(148)  评论(0编辑  收藏  举报
努力加载评论中...

点击右上角即可分享
微信分享提示