zoukankan      html  css  js  c++  java
  • 打印报表以显示具有给定责任的用户-FNDSCRUR责任用户

      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

  • 相关阅读:
    oracle 物化视图导入导出报错
    算法导论------------桶排序算法之研究
    实现一个做双向NAT的虚拟网卡
    合理的keyword密度散布与黑帽SEO之躲藏文本
    Java发送Email
    ubuntu系统下设置静态IP
    Design Pattern Iterator 迭代器设计模式
    概率论高速学习03:概率公理补充
    鄂尔多斯
    衬衫面料品牌:Alumo_衬衫_男装_男装:衬衫、法式衬衫、袖扣领带、西服西裤等男士正装服饰-仕族官网
  • 原文地址:https://www.cnblogs.com/quanweiru/p/5229686.html
Copyright © 2011-2022 走看看