它不起作用,我只收到错误 ORA-00913:“值太多。”。
我认为问题在于嵌套选择。我想用这个选择来查看。
此代码显示所有员工的报告。我更改了这篇文章的属性名称:
SELECT sk."AAAA", sk."BBBB", sk."CCCC", sk."DDD",
sk."EEEE", sk."FFFF", sk."GGGGG",
sk."HHHHH",
(SELECT f.VALUE
FROM fnd_user_property_tab f
WHERE f.identity = sk.login
AND NAME = 'IIIII') iii,sk."JJJJ",
(SELECT f.VALUE
FROM fnd_user_property_tab f
WHERE f.identity = sk.login
AND NAME = 'SMTP_MAIL_ADDRESS') mail,
(SELECT f.VALUE
FROM fnd_user_property_tab f
WHERE f.identity = sk.login
AND NAME = 'KKKK') kkkk,
(SELECT fnd.ORACLE_ROLE
FROM fnd_user_role_tab fnd
WHERE fnd.identity = sk.login
AND fnd.ORACLE_ROLE LIKE 'STH-%') profil,
(SELECT dr.ROLE, sox_co_w_roli(dr.role) skład
FROM sys.dba_roles dr
WHERE dr.role = (SELECT fnd.ORACLE_ROLE
FROM fnd_user_role_tab fnd
WHERE fnd.identity = sk.login
AND fnd.ORACLE_ROLE LIKE 'STH-%')
) profile_role
FROM sox_konta sk
WHERE("PROFIL_DB" LIKE '%ppppp%'
OR "PROFIL_DB" = 'oooooooo'
OR "PROFIL_DB" = 'rrrrrrrr'
)
AND "COMPANIES" IN ('ZZ; ', 'YY; ')