
[dbo].[ols_v_user_link_profile]
CREATE view ols_v_user_link_profile as
select usp.user_uuid as user_uuid,
min(sp.area_enabled) as area_enabled
from
ca_security_profile sp,
ca_link_dis_user_sec_profile usp
where
usp.security_profile_uuid = sp.security_profile_uuid
and sp.type != 1
group by usp.user_uuid
GO
GRANT SELECT ON [dbo].[ols_v_user_link_profile] TO [ams_group]
GRANT SELECT ON [dbo].[ols_v_user_link_profile] TO [ca_itrm_group]
GRANT SELECT ON [dbo].[ols_v_user_link_profile] TO [ca_itrm_group_ams]
GO