Hi everyone,
I'm struggling to figure out a way to update data based on a crosstab view. My scenario is as follows:
I have 'OBJECTS' as my row data and roles as the header:
I need to update the roles to have the inquiry objects IF they do not have access to the object already. So for T100, I would need to update the 'MktUpdate' role since 'MktInquire' has view access. For TS16R5, I would need to update all 3 to have access, etc.
I thought this could be achieved by using the following SQL to check the results but it didn't work:
I don't get any results with the above.
Can anyone please help.
I'm struggling to figure out a way to update data based on a crosstab view. My scenario is as follows:
I have 'OBJECTS' as my row data and roles as the header:

I need to update the roles to have the inquiry objects IF they do not have access to the object already. So for T100, I would need to update the 'MktUpdate' role since 'MktInquire' has view access. For TS16R5, I would need to update all 3 to have access, etc.
I thought this could be achieved by using the following SQL to check the results but it didn't work:
Code:
SELECT t.UserID, t.ObjectID, t.Permission, t2.UserID, t2.ObjectID, t2.Permission
FROM Test as t LEFT JOIN Test as t2 ON t.ObjectID = t2.ObjectID
WHERE (t.UserID = 'MktInquire' AND t2.UserID NOT IN ('MktInquire')) AND
t2.ObjectID IS NULL
I don't get any results with the above.
Can anyone please help.