Hello,
I am trying to know how to verify the result of the division below is an integer. This is a timesheet database which stores the value in minutes as a numeric value. I want to check the value entered is in 4 hour intervals. How should the comparrision be fixed correctly below?
SELECT TSL_KEY, TSL_CHR
FROM dbo.TSLINES
WHERE (TSL_KEY IN
(SELECT TSD_TSL
FROM dbo.TSDETAIL
GROUP BY TSD_TSL
HAVING (CAST(SUM(TSD_MON) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_TUE) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_WED) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_THU) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_FRI) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_SAT) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_SUN) AS INT) / 240 > 0))) AND (TSL_CHR = 206)
Thanks
Brian
I am trying to know how to verify the result of the division below is an integer. This is a timesheet database which stores the value in minutes as a numeric value. I want to check the value entered is in 4 hour intervals. How should the comparrision be fixed correctly below?
SELECT TSL_KEY, TSL_CHR
FROM dbo.TSLINES
WHERE (TSL_KEY IN
(SELECT TSD_TSL
FROM dbo.TSDETAIL
GROUP BY TSD_TSL
HAVING (CAST(SUM(TSD_MON) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_TUE) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_WED) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_THU) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_FRI) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_SAT) AS INT) / 240 > 0) OR
(CAST(SUM(TSD_SUN) AS INT) / 240 > 0))) AND (TSL_CHR = 206)
Thanks
Brian