declare @startRange int 
    select @startRange = count(1)
        from UPM_BIZ.Process.SSC_Sta_WorkTime
        where '2011-10-21 8:20:00'  > convert(datetimeconvert(varchar(10),'2011-10-21 14:20:00'105+ ' ' + [time])
    print @startRange

    

    这段代码在查询分析器里没问题,但是放到函数里就会报我标题写的那个错误,将 convert 函数里的 105 改成 120 就可以了。 

相关文章:

  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-06
相关资源
相似解决方案