Im trying to create SQL query that would retrieve all collections and
their handles from the given community. This means that collections
under subcommunities of the given root community would be returned as
well. Would someone have a script for this?

Below is something that I've come up so far. It works fairly well,
allthough it doesnt include the collections under subcommunities of
the given root community.

create temp view testi as (
SELECT collection.name, collection.collection_id  FROM collection,
community2collection
WHERE ((community2collection.collection_id = collection.collection_id) AND

(community2collection.community_id IN (SELECT community.community_id
FROM community,

community2community WHERE ((community2community.child_comm_id =
community.community_id) AND

(community2community.parent_comm_id = 52))))) ORDER BY collection.name);
select name, handle from testi, handle
where handle.resource_id = testi.collection_id;


Thanks for any help,
Mika

------------------------------------------------------------------------------
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to