WHENEVER SQLERROR EXIT FAILURE ROLLBACK;
WHENEVER OSERROR  EXIT FAILURE ROLLBACK;

spool SYS_USER_ROLE_GROUPS_VL.log


prompt
prompt Creating view SYS_SERVICE_LOOKUP_V
prompt =====================================
prompt
create or replace view sys_service_lookup_v as
select a.code_id,
       a.code,
       v.code_value_id,
       v.code_value,
       v.code_value_name_id,
       b.description_text as code_value_name,
       b.language,
	   v.enabled_flag
  from sys_codes a, sys_code_values v, fnd_descriptions b
 where a.code_id = v.code_id
   and b.ref_table = 'SYS_CODE_VALUES'
   and b.ref_field = 'CODE_VALUE_NAME_ID'
   and v.code_value_name_id = b.description_id(+);
/


spool off

exit
