declare @ts1 as time;
SELECT @ts1 = CAST('08:00:00 AM' AS TIME);
declare @ts2 as time;
SELECT @ts2 =CAST('12:00:00 PM' AS TIME);
select * from tasks.dbo.Tasks_PerHour_view
where jobtime between CONVERT(time(0), @ts1) and CONVERT(time(0), @ts2)
SELECT @ts1 = CAST('08:00:00 AM' AS TIME);
declare @ts2 as time;
SELECT @ts2 =CAST('12:00:00 PM' AS TIME);
select * from tasks.dbo.Tasks_PerHour_view
where jobtime between CONVERT(time(0), @ts1) and CONVERT(time(0), @ts2)
No comments:
Post a Comment