Most of our items just contain pdf files, but not all, and I'm writing a
script that counts the number of bitstreams in each item.  The numbers I'm
getting don't look quite right.  The SQL I'm using to compute the number of
items in an item is:

 

select count(*) from bundle B, item2bundle IB, Bundle2Bitstream BB,
Bitstream Bi where Bi.bitstream_id = BB.bitstream_id and IB.bundle_id =
BB.bundle_id and B.bundle_id = IB.bundle_id and IB.item_id = $item_id and
(B.name = 'ORIGINAL' or B.name='THUMBNAIL' )

 

where $item_id is the item_id I'm counting for.

 

I don't want to count the license file, or the txt file that gets created
when filter-media runs - just the items that the user deposited.  Can some
one confirm if this SQL is correct?

 

Many thanks!

 

Jose

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to