select --&p_hint
         distinct
         user_name,
         decode (
            greatest (u.start_date,
                      ur.start_date,
                      r.start_date,
                      to_date ('1000-01-01', 'YYYY-MM-DD')),
            to_date ('1000-01-01', 'YYYY-MM-DD'), '',
            to_char (greatest (u.start_date, ur.start_date, r.start_date)))
            resp_start_date,
         decode (
            least (nvl (u.end_date, to_date ('4712-01-01', 'YYYY-MM-DD')),
                   nvl (ur.end_date, to_date ('4712-01-01', 'YYYY-MM-DD')),
                   nvl (r.end_date, to_date ('4712-01-01', 'YYYY-MM-DD'))),
            to_date ('4712-01-01', 'YYYY-MM-DD'), '',
            to_char (
               least (nvl (u.end_date, nvl (ur.end_date, r.end_date)),
                      nvl (ur.end_date, nvl (u.end_date, r.end_date)),
                      nvl (r.end_date, nvl (u.end_date, ur.end_date)))))
            resp_end_date,
         s.security_group_name
         --        , u.description
         , rt.responsibility_name,
         rt.description
    from fnd_user u,
         fnd_user_resp_groups_all ur,
         fnd_responsibility r,
         fnd_security_groups_vl s,
         fnd_responsibility_tl rt
   where     1 = 1
         and rt.responsibility_id = r.responsibility_id
         and rt.application_id = r.application_id
         --AND r.application_id    = :application_id
         --  and   r.responsibility_id = :responsibility_id
         and user_name = 'QUANWEIRU'
         and ur.responsibility_application_id = r.application_id
         and ur.responsibility_id = r.responsibility_id
         and u.user_id = ur.user_id
         and ur.security_group_id = s.security_group_id
order by user_name, security_group_name

最新文章

  1. [课程设计]Scrum 1.3 多鱼点餐系统开发进度
  2. scrapy系统学习(1)--概要
  3. HTML5基础知识(1)--上标和下标文本
  4. Nginx的作用
  5. poi 读取 excel (.xls) 97-2003
  6. poj 3237 Tree 树链剖分+线段树
  7. Makefile中include、-include、sinclude的区别
  8. 关于常用却忘记的css,jQuery
  9. 【转】linux命令useradd添加用户详解
  10. python3.5 修改 IIS WEB.CONFIG的相关方法
  11. 镜像命名的最佳实践 - 每天5分钟玩转 Docker 容器技术(18)
  12. MYSQL报错注入方法整理
  13. FileBeat安装配置
  14. 使用paginate分页后数据处理
  15. protel dxp 2004安装与破解
  16. Android ScrollView内部组件设置android:layout_height="fill_parent"无效的解决办法
  17. mysql(5.7以上)查询报错:ORDER BY clause is not in GROUP BY..this is incompatible with sql_mode=only_full_group_by
  18. zabbix宏(macro)使用:自定义监控阈值
  19. 倒数第N个字符串
  20. (转) argparse — 解析命令参数和选项

热门文章

  1. 【php】 php.ini文件位置解析
  2. LeetCode(111) Minimum Depth of Binary Tree
  3. cygin常用命令
  4. 【转】VS2017的VSIX插件开发
  5. 本机机器ssh docker容器
  6. luogu3698 [CQOI2017]小Q的棋盘
  7. python的re模块常用方法
  8. wordpress无法登录的解决方法
  9. php(ajax)异步刷新(转)
  10. POJ-1442 Black Box,treap名次树!