Advertisement
Guest User

Untitled

a guest
Jun 3rd, 2017
185
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. WITH CTE AS ( SELECT EmployeeID = 'ABH12345', [Date] = CAST(N'2016-01-01' AS Date), [Onleave] = 0
  2. UNION SELECT 'ABH12345', CAST(N'2016-01-02' AS Date), 0
  3. UNION SELECT 'ABH12345', CAST(N'2016-01-03' AS Date), 0
  4. UNION SELECT 'ABH12345', CAST(N'2016-01-04' AS Date), 0
  5. UNION SELECT 'ABH12345', CAST(N'2016-01-05' AS Date), 0
  6. UNION SELECT 'ABH12345', CAST(N'2016-01-06' AS Date), 0
  7. UNION SELECT 'ABH12345', CAST(N'2016-01-07' AS Date), 0
  8. UNION SELECT 'ABH12345', CAST(N'2016-01-08' AS Date), 0
  9. UNION SELECT 'ABH12345', CAST(N'2016-01-09' AS Date), 0
  10. UNION SELECT 'ABH12345', CAST(N'2016-01-10' AS Date), 1
  11. UNION SELECT 'ABH12345', CAST(N'2016-01-11' AS Date), 1
  12. UNION SELECT 'ABH12345', CAST(N'2016-01-12' AS Date), 1
  13. UNION SELECT 'ABH12345', CAST(N'2016-01-13' AS Date), 1
  14. UNION SELECT 'ABH12345', CAST(N'2016-01-14' AS Date), 0
  15. UNION SELECT 'ABH12345', CAST(N'2016-01-15' AS Date), 0
  16. UNION SELECT 'ABH12345', CAST(N'2016-01-16' AS Date), 0
  17. UNION SELECT 'ABH12345', CAST(N'2016-01-17' AS Date), 0
  18. )
  19.  
  20. SELECT * FROM CTE
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement