Advertisement
Guest User

Untitled

a guest
Jul 25th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. Employee Role Contract Hours IS primary Role Valid from
  2. 1 Role A 35 Y 01/03/2015
  3. 1 Role B 35 Y 01/06/2016
  4. 1 Role C 0 N 01/07/2016
  5. 2 Role A 20 Y 01/01/2016
  6. 2 Role B 0 N 01/01/2016
  7. 2 Role C 25 Y 01/04/2016
  8. 3 Role A 35 Y 01/04/2016
  9.  
  10. Employee Role Contract Hours Valid from Primary Role – Contract Hours
  11. 1 Role A 35 01/03/2015 Role A – 35
  12. 1 Role B 35 01/06/2016 Role B – 35
  13. 1 Role C 0 01/07/2016 Role B – 35
  14. 2 Role A 20 01/01/2016 Role A – 20
  15. 2 Role B 0 01/01/2016 Role A – 20
  16. 2 Role C 25 01/04/2016 Role C – 25
  17. 3 Role A 35 01/04/2016 Role A – 35
  18.  
  19. Select
  20. “Employee”,
  21. “Role”,
  22. “Contract Hours”,
  23. “Valid From”,
  24. Case
  25. When “Is primary Role” = Y
  26. Then “Role” + ‘-‘ + “Contract Hours”
  27. Else NULL
  28. END as “Primary Role – Contract Hours”
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement