Hi Mayank,
Try this query - You will have to change the obs_type_name to the name of your OBS.
You will have to change in the below places
obs_type_name='Department OBS'
obs_type_name='Finance Reporting OBS'
select srm.unique_name Res_id,
(select user_name from cmn_sec_users where id = srm.user_id) User_id,
(case when srm.is_active =0 then 'Inactive' else 'Active' END) res_status,
'Financiall Disabled' financial_status,
(select level2_name from nbi_dim_obs where obs_unit_id in(select unit_id from prj_obs_associations where table_name='SRM_RESOURCES' and record_id=srm.id)
and obs_type_name='Department OBS') as BU_Group,
(select path from nbi_dim_obs where obs_unit_id in(select unit_id from prj_obs_associations where table_name='SRM_RESOURCES' and record_id=srm.id)
and obs_type_name='Department OBS') as DEPT_OBS,
(select path from nbi_dim_obs where obs_unit_id in(select unit_id from prj_obs_associations where table_name='SRM_RESOURCES' and record_id=srm.id)
and obs_type_name='Finance Reporting OBS') as RES_OBS
from srm_resources srm
where srm.unique_name not in
(select srm.unique_name res_id from pac_mnt_resources pac,srm_resources srm,prj_resources prj
where pac.active=1 and srm.id = pac.id and prj.prid = pac.id and prj.prid=srm.id and prj.prisrole=0)
and srm.user_id is not null
UNION
select srm.unique_name Res_id,
(select user_name from cmn_sec_users where id = srm.user_id) User_id,
(case when srm.is_active =0 then 'Inactive' else 'Active' END) res_status,
'Financiall Enable' financial_status,
(select level2_name from nbi_dim_obs where obs_unit_id in(select unit_id from prj_obs_associations where table_name='SRM_RESOURCES' and record_id=srm.id)
and obs_type_name='Department OBS') as BU_Group,
(select path from nbi_dim_obs where obs_unit_id in(select unit_id from prj_obs_associations where table_name='SRM_RESOURCES' and record_id=srm.id)
and obs_type_name='Department OBS') as DEPT_OBS,
(select path from nbi_dim_obs where obs_unit_id in(select unit_id from prj_obs_associations where table_name='SRM_RESOURCES' and record_id=srm.id)
and obs_type_name='Finance Reporting OBS') as RES_OBS
from srm_resources srm
where srm.unique_name in
(select srm.unique_name res_id from pac_mnt_resources pac,srm_resources srm,prj_resources prj
where pac.active=1 and srm.id = pac.id and prj.prid = pac.id and prj.prid=srm.id and prj.prisrole=0)
and srm.user_id is not null
Thanks,
Jerin