Guest User

Untitled

a guest
Nov 20th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. ID Status W_ID
  2. 1 In Progress 7
  3. 2 In Progress 5
  4. 3 Complete 5
  5. 4 In Progress NULL
  6. 5 Complete 7
  7.  
  8. ID Status W_ID
  9. 2 In Progress 5
  10. 4 In Progress NULL
  11.  
  12. Select * from table where Status = 'In Progress' and (W_ID is NULL or W_ID = 5)
  13.  
  14. WHERE Status = 'In Progress' AND (W_ID IS NULL OT W_ID = 5)
  15.  
  16. WHERE Status = 'In Progress' AND ISNULL(W_ID,5)= 5
Add Comment
Please, Sign In to add comment