John Mitchell-245523
SSC Guru
Points: 148809
More actions
August 10, 2015 at 4:54 am
#1818477
Something like this?
SELECT
dato
FROM dbo.dutyrostershift d
JOIN dbo.vacation v
ON d.dato BETWEEN CAST(start-36163 AS datetime) AND CAST(fld_end-36163 AS datetime)
AND d.employeeid = v.personalid
WHERE d.shifttype = 2
John
Edvard Korsbæk
SSCertifiable
Points: 5999
August 10, 2015 at 5:27 am
#1818490
Thanks for showing my that the ON Clause is much more powerfull than i have seen.
Best regards
Viewing 2 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply