Guest User

Untitled

a guest
Nov 21st, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. with source as (
  2. select 'abc' a from dual union all
  3. select 'def' a from dual union all
  4. select 'hij' a from dual)
  5. select *
  6. from source;
  7.  
  8. with source as (
  9. select 'abc' a from dual union all
  10. select 'def' a from dual union all
  11. select 'hij' a from dual)
  12. select a, sort_column
  13. from (select a, translate(a, 'adh', 'dah') sort_column
  14. from source)
  15. order by sort_column;
  16.  
  17. A SORT_COLUMN
  18. --- -----------
  19. def aef
  20. abc dbc
  21. hij hij
Add Comment
Please, Sign In to add comment