sql - Conversion failed when converting the varchar value '7:00' to data type int -
i cant figure how convert time. seen other ways on how convert other values not time. can thanks.
select count(*) reporting_call_matrix (nolock) calendar_date between '10/1/2015' , '10/31/2016' , call_hour between '7:00' , '19:00'
based on error message, call_hour
appear integer. so, try this:
select count(*) reporting_call_matrix (nolock) calendar_date between '2015-10-01' , '2016-10-31' , call_hour between 7 , 19;
i advise use iso standard date formats date constants.
Comments
Post a Comment