On Tue, Jul 31, 2012 at 5:16 PM, Alain Tschanz <[email protected]> wrote: > Thank you very much for your quick response. Your SQL code solved my problem. > May I ask a related SQL question: > I would like to run a query that fetches all handles and files associated > with a collection. Specifically, I need to know the name of the file, URL of > the file (so I can download it with wget or curl) and handle.
Please, always CC dspace-tech. Enter the collection handle here and modify the URL prefix: SELECT 'http://example.com/bitstream/handle/'||handle.handle||'/'||bitstream.name FROM handle, collection2item, item2bundle, bundle2bitstream, bitstream WHERE handle.resource_id = collection2item.item_id AND collection2item.item_id = item2bundle.item_id AND item2bundle.bundle_id = bundle2bitstream.bundle_id AND bundle2bitstream.bitstream_id = bitstream.bitstream_id AND collection2item.collection_id IN (SELECT resource_id FROM handle WHERE handle='123456789/123') The DSpace database schema should help you write any queries you need: https://wiki.duraspace.org/display/DSPACE/DSpace+2.0+Requirements+and+Issues#DSpace2.0RequirementsandIssues-DatabaseOverviewGraphic Regards, ~~helix84 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ DSpace-tech mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dspace-tech

