Created
September 27, 2010 17:12
-
-
Save peterdietz/599397 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
* | |
FROM | |
public.item2bundle, | |
public.bundle, | |
public.bundle2bitstream, | |
public.resourcepolicy | |
WHERE | |
item2bundle.bundle_id = bundle.bundle_id AND | |
bundle.bundle_id = bundle2bitstream.bundle_id AND | |
resourcepolicy.resource_id = bundle2bitstream.bitstream_id AND | |
bundle."name" = 'THUMBNAIL' AND | |
resourcepolicy.resource_type_id = 0 AND | |
resourcepolicy.action_id = 0 AND | |
resourcepolicy.epersongroup_id = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE | |
resourcepolicy | |
SET | |
epersongroup_id=0 | |
WHERE | |
(policy_id IN ( | |
SELECT | |
resourcepolicy.policy_id | |
FROM | |
public.item2bundle, | |
public.bundle, | |
public.bundle2bitstream, | |
public.resourcepolicy | |
WHERE | |
item2bundle.bundle_id = bundle.bundle_id AND | |
bundle.bundle_id = bundle2bitstream.bundle_id AND | |
resourcepolicy.resource_id = bundle2bitstream.bitstream_id AND | |
bundle."name" = 'THUMBNAIL' AND | |
resourcepolicy.resource_type_id = 0 AND | |
resourcepolicy.action_id = 0 AND | |
resourcepolicy.epersongroup_id = 1 | |
)); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment