Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. ;with cte as
  2. (
  3. SELECT WeekNum
  4. FROM MonitorTable
  5. GROUP BY WeekNum
  6. HAVING SUM(CASE WHEN IsProcessed = 1 THEN 1
  7. ELSE 0
  8. END) = 8
  9. order by WeekNum
  10. ) update MonitorTable set ReadToGrid = 0 where WeekNum in (select WeekNum from cte)
  11.  
  12. 1
  13. 2
  14. 3
  15. 4
  16. 5
  17. 6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement