Guest User

Untitled

a guest
Feb 22nd, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. > Vendor Is_Active
  2. ABC(1263) 1
  3. efgh (187 1
  4. pqrs 890ag) 1
  5. xyz 1
  6. lmno(488) 1
  7. (9867-12) 1
  8.  
  9. ID Name
  10. 1263 ABC
  11. 187 efgh
  12. 890ag pqrs
  13. xyz
  14. 488 lmno
  15. 9867-12
  16.  
  17. select vendor,case when vendor like '%(%' or vendor like '%)%' then Replace(Replace(right(A.Vendor, charindex(' ', reverse(vendor)) - 1),'(',''),')','') end as 'test' from tableA a
Add Comment
Please, Sign In to add comment