Guest User

Untitled

a guest
Jun 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. TRAN_TYPE
  2. ----------
  3. success
  4. failed
  5. 123456-001
  6. 654321-001
  7. 098765-002
  8. time out
  9.  
  10. 123456-001
  11. 654321-001
  12. 098765-002
  13.  
  14. where regexp_like(tran_type, '^d{6}-d{3}$');
  15.  
  16. with your_table (tran_type) as (
  17. select 'success' from dual
  18. union all select 'failed' from dual
  19. union all select '123456-001' from dual
  20. union all select '654321-001' from dual
  21. union all select '098765-002' from dual
  22. union all select 'time out' from dual
  23. )
  24. select tran_type
  25. from your_table
  26. where regexp_like(tran_type, '^d{6}-d{3}$');
  27.  
  28. TRAN_TYPE
  29. ----------
  30. 123456-001
  31. 654321-001
  32. 098765-002
Add Comment
Please, Sign In to add comment