create view iam_object_view ( object_guid, object_name, location_name, object_class, object_link, product_instance_name, version_number ) as select s1.norm object_guid, s2.norm object_name, s3.norm location_name, s4.norm object_class, s7.norm object_link, s5.norm product_instance_name, s6.norm version_number from ( search s1 inner join attr a1 on s1.aid = a1.aid and a1.description = 'pozId') inner join ( search s2 inner join attr a2 on s2.aid = a2.aid and a2.description = 'commonName') on s1.eid = s2.eid left join ( search s3 inner join attr a3 on s3.aid = a3.aid and a3.description = 'pozLocation') on s1.eid = s3.eid inner join ( search s4 inner join attr a4 on s4.aid = a4.aid and a4.description = 'pozClass') on s1.eid = s4.eid left join ( search s5 inner join attr a5 on s5.aid = a5.aid and a5.description = 'pozLabel') on s1.eid = s5.eid inner join ( search s6 inner join attr a6 on s6.aid = a6.aid and a6.description = 'pozGeneration') on s1.eid = s6.eid left join ( search s7 inner join attr a7 on s7.aid = a7.aid and a7.description = 'pozLink') on s1.eid = s7.eid inner join search s8 on s1.eid = s8.eid and s8.aid = 0 and ( s8.norm = '1.3.6.1.4.1.791.2.3.5.5.1.6.2' or s8.norm = '1.3.6.1.4.1.791.2.3.5.5.1.6.3')
GO
GRANT SELECT ON [dbo].[iam_object_view] TO [dsaadmin]
GO