Created
October 16, 2013 15:26
-
-
Save peterdietz/7009560 to your computer and use it in GitHub Desktop.
A SQL query to find bitstreams in a different assetstore than assetstore0. Hint: change bitstream.store_number to 0, 1, or something more to see bitstream in that assetstore. We were in the process of merging a DSpace assetstore, and this is how we found things to check from the different store.
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 | |
handle.handle, | |
item.item_id, | |
item.in_archive, | |
bitstream.bitstream_id, | |
bitstream.name, | |
bitstream.store_number | |
FROM | |
public.item, | |
public.item2bundle, | |
public.bundle2bitstream, | |
public.bitstream, | |
public.handle | |
WHERE | |
item2bundle.item_id = item.item_id AND | |
bundle2bitstream.bundle_id = item2bundle.bundle_id AND | |
bitstream.bitstream_id = bundle2bitstream.bitstream_id AND | |
handle.resource_id = item.item_id AND | |
handle.resource_type_id = 2 AND | |
bitstream.store_number = 1 AND | |
item.in_archive = true | |
limit 10; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment