Hi All,
We have Siebel Analytics 7.5 and Oracle 9.2.0
Recently I created a variable in Analytic call “USER_SUPERVISOR”. The definition for this variable is as follow:
select login from siebel.s_user where row_id = (select pr_emp_id from siebel.s_postn where row_id = (select party_id from siebel.s_party_rpt_rel where rel_type_cd = 'DIRECT' and sub_party_id = (select pr_held_postn_id from siebel.s_contact where row_id = (select row_id from siebel.s_user where login = ':USER'))))
The ':USER' is a session variable and the code returns the value of the user’s supervisor.
For example Joe reports to Tim. When Joe login the USER variable is Joe and the USER_SUPERVISOR variable is Tim. However if Tim login and Tim does not have a supervisor I want the code to return Tim as the variable for both USER and USER_SUPERVISOR. I though I could accomplish this with the following:
select NVL(login,':USER') from siebel.s_user where row_id = (select pr_emp_id from siebel.s_postn where row_id = (select party_id from siebel.s_party_rpt_rel where rel_type_cd = 'DIRECT' and sub_party_id = (select pr_held_postn_id from siebel.s_contact where row_id = (select row_id from siebel.s_user where login = ':USER'))))
As you might have guessed it’s not working. It’s returning an empty result set instead of “Tim”. Any insight or suggestion will be greatly appreciated.
Thanks
We have Siebel Analytics 7.5 and Oracle 9.2.0
Recently I created a variable in Analytic call “USER_SUPERVISOR”. The definition for this variable is as follow:
select login from siebel.s_user where row_id = (select pr_emp_id from siebel.s_postn where row_id = (select party_id from siebel.s_party_rpt_rel where rel_type_cd = 'DIRECT' and sub_party_id = (select pr_held_postn_id from siebel.s_contact where row_id = (select row_id from siebel.s_user where login = ':USER'))))
The ':USER' is a session variable and the code returns the value of the user’s supervisor.
For example Joe reports to Tim. When Joe login the USER variable is Joe and the USER_SUPERVISOR variable is Tim. However if Tim login and Tim does not have a supervisor I want the code to return Tim as the variable for both USER and USER_SUPERVISOR. I though I could accomplish this with the following:
select NVL(login,':USER') from siebel.s_user where row_id = (select pr_emp_id from siebel.s_postn where row_id = (select party_id from siebel.s_party_rpt_rel where rel_type_cd = 'DIRECT' and sub_party_id = (select pr_held_postn_id from siebel.s_contact where row_id = (select row_id from siebel.s_user where login = ':USER'))))
As you might have guessed it’s not working. It’s returning an empty result set instead of “Tim”. Any insight or suggestion will be greatly appreciated.
Thanks