Advertisement
Guest User

Untitled

a guest
May 7th, 2015
237
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. SELECT
  2. ...
  3. xyz.code
  4. , Sum(
  5. IIf([ABSENCE_TYPE01] In ("L","S","Z"),1,0)
  6. +IIf([ABSENCE_TYPE02] In ("L","S","Z"),1,0)
  7. +IIf([ABSENCE_TYPE03] In ("L","S","Z"),1,0)
  8. +IIf([ABSENCE_TYPE04] In ("L","S","Z"),1,0)) AS Explnd
  9. ....
  10. FROM xyz
  11. WHERE ...
  12. GROUP BY
  13. xyz.code;
  14.  
  15. , Sum(
  16. IIf([ABSENCE_TYPE01] In (SELECT Unexp FROM tblAbsenceCodes),1,0)
  17. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement