Advertisement
StoyanGrigorov

Untitled

Feb 11th, 2017
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 0.18 KB | None | 0 0
  1. SELECT ch.Title, ch.IsActive
  2. FROM Chats AS ch
  3. WHERE ch.IsActive = 0
  4. AND
  5. (LEN(ch.Title) < 5 OR (SUBSTRING(ch.Title,3,2) = 'tl'))
  6. AND ch.IsActive IS NOT NULL
  7. ORDER BY ch.Title DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement