Advertisement
Guest User

Untitled

a guest
Jan 20th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2. SELECT emp.id AS "Chapa"
  3.      , INITCAP(REGEXP_REPLACE(name, '[[:space:]]+', CHR(32))) AS "Nome"
  4.      , emp.status || ' - ' || (SELECT description FROM t_lookup WHERE source = 't_employee' AND locale_id = '1046' AND text = emp.status) AS "Status"
  5.      , emp.menu_level AS "Grupo"
  6. FROM t_employee emp
  7. ORDER BY "Grupo", "Status";
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement