Re: [Dspace-tech] Identifying items with and without bitstream

2013-07-16 Thread Terry Brady
The following SQL will return items without an original bitstream.

Remove the line "and b.name = 'ORIGINAL'" to find items with no bitstreams
at all.

If you are not using postgres, you may need to modify the command to format
the title.

Terry

select
  h.handle,
  regexp_replace(t.text_value,E'[\r\n\t ]+',' ','g') as title
from
  item i2
inner join
  metadatavalue t
  on t.item_id = i2.item_id
inner join
  metadatafieldregistry mfr
  on t.metadata_field_id=mfr.metadata_field_id
  and mfr.element='title'
inner join
  handle h
  on h.resource_id = i2.item_id and h.resource_type_id = 2
where not exists
(
  select 1
  from item2bundle i2b
  inner join bundle b
on i2b.bundle_id = b.bundle_id
and b.name = 'ORIGINAL'
  where i2.item_id = i2b.item_id
)


On Tue, Jul 9, 2013 at 3:01 AM, Tint Hla Hla Htoo wrote:

>  Hello
>
> ** **
>
> In our repository, several items are metadata only - no bitstreams. Now we
> would like to know which items are with bitstreams and which are not.
> Appreciate it very much if someone could tell me how I can get a list of
> item-ids for items with bitstreams and a list without.
>
> Thanks.
>
> ** **
>
> Tint Hla Hla Htoo
>
> Senior Librarian
>
> Nanyang Technological University Libraries
>
> ** **
>
> --
> CONFIDENTIALITY:This email is intended solely for the person(s) named and
> may be confidential and/or privileged.If you are not the intended
> recipient,please delete it,notify us and do not copy,use,or disclose its
> content.
>
> Towards A Sustainable Earth:Print Only When Necessary.Thank you.
>
>
> --
> See everything from the browser to the database with AppDynamics
> Get end-to-end visibility with application monitoring from AppDynamics
> Isolate bottlenecks and diagnose root cause in seconds.
> Start your free trial of AppDynamics Pro today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk
> ___
> DSpace-tech mailing list
> DSpace-tech@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/dspace-tech
> List Etiquette:
> https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
>



-- 
Terry Brady
Applications Programmer Analyst
Lauinger Information Technology
202-687-7053
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

[Dspace-tech] Identifying items with and without bitstream

2013-07-09 Thread Tint Hla Hla Htoo
Hello

In our repository, several items are metadata only - no bitstreams. Now we 
would like to know which items are with bitstreams and which are not. 
Appreciate it very much if someone could tell me how I can get a list of 
item-ids for items with bitstreams and a list without.
Thanks.

Tint Hla Hla Htoo
Senior Librarian
Nanyang Technological University Libraries



CONFIDENTIALITY:This email is intended solely for the person(s) named and may 
be confidential and/or privileged.If you are not the intended recipient,please 
delete it,notify us and do not copy,use,or disclose its content.

Towards A Sustainable Earth:Print Only When Necessary.Thank you.
--
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette