(问题待解决)sql查询不显示前置‘0’的问题

SELECT *
,CONVERT(INT,progress)%60
,CONVERT(VARCHAR(10),(case when (CONVERT(INT,progress)%60)>9 then (CONVERT(DECIMAL,progress)%60)  else '012' end))
from CourseBooksNotes

DECLARE @a int=05
SELECT CONVERT(VARCHAR(10),@a/60)+''+CONVERT(VARCHAR(10),@a%60)+''; 
SELECT CONVERT(VARCHAR(10),@a/3600)+''+CONVERT(VARCHAR(10),@a%3600/60)+''+CONVERT(VARCHAR(10),@a%3600%60)+''

posted @ 2018-05-08 20:23  吖然-jronny  阅读(682)  评论(0编辑  收藏  举报