use 'between' with varchar (sql server)

后端 未结 3 1144
走了就别回头了
走了就别回头了 2021-01-20 10:33

Using SQL Server 2005 Express.

(
    CONVERT(VARCHAR(8), R.reviewStart, 108) between CONVERT(VARCHAR(8), M.meetingStart, 108) and CONVERT(VARCHAR(8), M.meeti         


        
3条回答
  •  无人共我
    2021-01-20 10:42

    As I said in your other post if is possible you should consider moving to SQL 2008 because of the new datetime types that allow explicit separation of date part and time part so your filter expressions become much simpler and you can index by time. Since its Express there really shouldn't be any reason to hold you back at 2005.

提交回复
热议问题