DV
Deb Verhoff
Tue, Jan 26, 2016 7:53 PM
I am trying to run Jaspersoft Studio report against our CSpace instance. I
have the connection working and the general idea down.
I see there is an issue with the SQL query I entered when generating a
report. Can anyone share back their queries, which I could use or alter?
SELECT
co.c.objectnumber AS collectionobject_objectnumber,
tg.title AS titlegroup_title,
regexp_replace(co_c.computedCurrentLocation,'^.)''(.)''$'. '\1')
AS collectionObject_currentLocation
FROM
collectionobjects_common co_c
LEFT OUTER JOIN hierarchy h1 ON (co_c.id = h1.id)
INNER JOIN misc ON (misc.id=co_c.id AND misc.lifecyclestate <> 'deleted')
INNER JOIN collectionspace_core core ON (core.id=co_c.id AND
core.tenantid=11)
LEFT OUTER JOIN hierarchy htg ON (co_c.id=htg.parentid AND htg.name
='collectionobjectnumber')
LEFT OUTER JOIN titlegroup tg ON (htg.id=tg.id)
Thanks,
Deb
--
Deb Verhoff
Librarian | The Watermill Center
39 Watermill Towd Road, Water Mill, NY 11976
main: +1 631 726 4628 | mobile: +1 978 549 5561
JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY!
http://www.watermillcenter.org/support
SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER
BENEFIT & AUCTION | FADA: HOUSE OF MADNESS
http://www.watermillcenter.org/events/benefit
Connect with us on Facebook https://www.facebook.com/watermillcenter,
Twitter http://twitter.com/#%21/watermillcenter, Flickr,
http://www.flickr.com/photos/watermillresidencies/ Vimeo
https://vimeo.com/watermillcenter and Pinterest
http://pinterest.com/watermillcenter/. Join our email list!
http://watermillcenter.org/content/newsletter-signup
The Watermill Center is the principal operation of the Byrd Hoffman
Watermill Foundation,
a US 501(c)3 organization incorporated in the state of New York.
I am trying to run Jaspersoft Studio report against our CSpace instance. I
have the connection working and the general idea down.
I see there is an issue with the SQL query I entered when generating a
report. Can anyone share back their queries, which I could use or alter?
SELECT
co.c.objectnumber AS collectionobject_objectnumber,
tg.title AS titlegroup_title,
regexp_replace(co_c.computedCurrentLocation,'^.*\)''(.*)''$'. '\1')
AS collectionObject_currentLocation
FROM
collectionobjects_common co_c
LEFT OUTER JOIN hierarchy h1 ON (co_c.id = h1.id)
INNER JOIN misc ON (misc.id=co_c.id AND misc.lifecyclestate <> 'deleted')
INNER JOIN collectionspace_core core ON (core.id=co_c.id AND
core.tenantid=11)
LEFT OUTER JOIN hierarchy htg ON (co_c.id=htg.parentid AND htg.name
='collectionobjectnumber')
LEFT OUTER JOIN titlegroup tg ON (htg.id=tg.id)
Thanks,
Deb
--
Deb Verhoff
Librarian | The Watermill Center
39 Watermill Towd Road, Water Mill, NY 11976
main: +1 631 726 4628 | mobile: +1 978 549 5561
*JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY!
<http://www.watermillcenter.org/support>*
*SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER
BENEFIT & AUCTION | FADA: HOUSE OF MADNESS
<http://www.watermillcenter.org/events/benefit>*
*Connect with us on Facebook <https://www.facebook.com/watermillcenter>,
Twitter <http://twitter.com/#%21/watermillcenter>, Flickr,
<http://www.flickr.com/photos/watermillresidencies/> Vimeo
<https://vimeo.com/watermillcenter> and Pinterest
<http://pinterest.com/watermillcenter/>. Join our email list!
<http://watermillcenter.org/content/newsletter-signup>*
The Watermill Center is the principal operation of the Byrd Hoffman
Watermill Foundation,
a US 501(c)3 organization incorporated in the state of New York.
CH
Chris Hoffman
Tue, Jan 26, 2016 10:41 PM
On Jan 26, 2016, at 11:53 AM, Deb Verhoff deb.verhoff@watermillcenter.org wrote:
I am trying to run Jaspersoft Studio report against our CSpace instance. I have the connection working and the general idea down.
I see there is an issue with the SQL query I entered when generating a report. Can anyone share back their queries, which I could use or alter?
SELECT
co.c.objectnumber AS collectionobject_objectnumber,
tg.title AS titlegroup_title,
regexp_replace(co_c.computedCurrentLocation,'^.)''(.)''$'. '\1')
AS collectionObject_currentLocation
FROM
collectionobjects_common co_c
LEFT OUTER JOIN hierarchy h1 ON (co_c.id http://co_c.id/ = h1.id http://h1.id/)
INNER JOIN misc ON (misc.id http://misc.id/=co_c.id http://co_c.id/ AND misc.lifecyclestate <> 'deleted')
INNER JOIN collectionspace_core core ON (core.id http://core.id/=co_c.id http://co_c.id/ AND core.tenantid=11)
LEFT OUTER JOIN hierarchy htg ON (co_c.id http://co_c.id/=htg.parentid AND htg.name http://htg.name/='collectionobjectnumber')
LEFT OUTER JOIN titlegroup tg ON (htg.id http://htg.id/=tg.id http://tg.id/)
Thanks,
Deb
--
Deb Verhoff
Librarian | The Watermill Center
39 Watermill Towd Road, Water Mill, NY 11976
main: +1 631 726 4628 | mobile: +1 978 549 5561
JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY! http://www.watermillcenter.org/support
SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER BENEFIT & AUCTION | FADA: HOUSE OF MADNESS http://www.watermillcenter.org/events/benefit
Connect with us on Facebook https://www.facebook.com/watermillcenter, Twitter http://twitter.com/#%21/watermillcenter, Flickr, http://www.flickr.com/photos/watermillresidencies/ Vimeo https://vimeo.com/watermillcenter and Pinterest http://pinterest.com/watermillcenter/. Join our email list! http://watermillcenter.org/content/newsletter-signup
The Watermill Center is the principal operation of the Byrd Hoffman Watermill Foundation,
a US 501(c)3 organization incorporated in the state of New York.
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Hi Deb,
Not sure you’ve heard from anyone else yet, but I’ll point to the UC Berkeley reports in github:
https://github.com/cspace-deployment/Tools/tree/master/reports <https://github.com/cspace-deployment/Tools/tree/master/reports>
I can’t get in and troubleshoot your query right now, but these are notoriously difficult! Good luck and let us know how it goes!
Thanks,
Chris
> On Jan 26, 2016, at 11:53 AM, Deb Verhoff <deb.verhoff@watermillcenter.org> wrote:
>
> I am trying to run Jaspersoft Studio report against our CSpace instance. I have the connection working and the general idea down.
>
> I see there is an issue with the SQL query I entered when generating a report. Can anyone share back their queries, which I could use or alter?
>
> SELECT
> co.c.objectnumber AS collectionobject_objectnumber,
> tg.title AS titlegroup_title,
> regexp_replace(co_c.computedCurrentLocation,'^.*\)''(.*)''$'. '\1')
> AS collectionObject_currentLocation
> FROM
> collectionobjects_common co_c
> LEFT OUTER JOIN hierarchy h1 ON (co_c.id <http://co_c.id/> = h1.id <http://h1.id/>)
> INNER JOIN misc ON (misc.id <http://misc.id/>=co_c.id <http://co_c.id/> AND misc.lifecyclestate <> 'deleted')
> INNER JOIN collectionspace_core core ON (core.id <http://core.id/>=co_c.id <http://co_c.id/> AND core.tenantid=11)
>
> LEFT OUTER JOIN hierarchy htg ON (co_c.id <http://co_c.id/>=htg.parentid AND htg.name <http://htg.name/>='collectionobjectnumber')
> LEFT OUTER JOIN titlegroup tg ON (htg.id <http://htg.id/>=tg.id <http://tg.id/>)
>
>
> Thanks,
> Deb
>
>
>
> --
> Deb Verhoff
> Librarian | The Watermill Center
> 39 Watermill Towd Road, Water Mill, NY 11976
> main: +1 631 726 4628 | mobile: +1 978 549 5561
>
> JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY! <http://www.watermillcenter.org/support>
>
> SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER BENEFIT & AUCTION | FADA: HOUSE OF MADNESS <http://www.watermillcenter.org/events/benefit>
>
> Connect with us on Facebook <https://www.facebook.com/watermillcenter>, Twitter <http://twitter.com/#%21/watermillcenter>, Flickr, <http://www.flickr.com/photos/watermillresidencies/> Vimeo <https://vimeo.com/watermillcenter> and Pinterest <http://pinterest.com/watermillcenter/>. Join our email list! <http://watermillcenter.org/content/newsletter-signup>
> The Watermill Center is the principal operation of the Byrd Hoffman Watermill Foundation,
> a US 501(c)3 organization incorporated in the state of New York.
> _______________________________________________
> Talk mailing list
> Talk@lists.collectionspace.org
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
AR
Aron Roberts
Wed, Jan 27, 2016 1:34 AM
Hi Deb,
With many thanks to Chris for the pointer to UC Berkeley's reports in
GitHub, from which I appropriated freely, here's a possible starting place
for experimenting with your SQL query:
https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases
This also suggests one potential technique - starting out with a very
basic initial query, without even any JOINs - and then incrementally
building and testing successively more complex queries - that can make it
easier to find and fix SQL errors and unanticipated results, during the
process of constructing more full-featured reports.
Aron
P.S. I'm not expert at this, so some comments, SQL techniques, etc. here
may be inaccurate, or at least sub-optimal. But these queries at least
appear to return sensible results, based on a small set of 17
CollectionObject (cataloging) records present in the Demo server's (
http://www.collectionspace.org/demo/) Core tenant.
On Tue, Jan 26, 2016 at 2:41 PM, Chris Hoffman chris_h@berkeley.edu wrote:
Hi Deb,
Not sure you’ve heard from anyone else yet, but I’ll point to the UC
Berkeley reports in github:
https://github.com/cspace-deployment/Tools/tree/master/reports
I can’t get in and troubleshoot your query right now, but these are
notoriously difficult! Good luck and let us know how it goes!
Thanks,
Chris
On Jan 26, 2016, at 11:53 AM, Deb Verhoff deb.verhoff@watermillcenter.org
wrote:
I am trying to run Jaspersoft Studio report against our CSpace instance. I
have the connection working and the general idea down.
I see there is an issue with the SQL query I entered when generating a
report. Can anyone share back their queries, which I could use or alter?
SELECT
co.c.objectnumber AS collectionobject_objectnumber,
tg.title AS titlegroup_title,
regexp_replace(co_c.computedCurrentLocation,'^.)''(.)''$'. '\1')
AS collectionObject_currentLocation
FROM
collectionobjects_common co_c
LEFT OUTER JOIN hierarchy h1 ON (co_c.id = h1.id)
INNER JOIN misc ON (misc.id=co_c.id AND misc.lifecyclestate <>
'deleted')
INNER JOIN collectionspace_core core ON (core.id=co_c.id AND
core.tenantid=11)
LEFT OUTER JOIN hierarchy htg ON (co_c.id=htg.parentid AND htg.name
='collectionobjectnumber')
LEFT OUTER JOIN titlegroup tg ON (htg.id=tg.id)
Thanks,
Deb
--
Deb Verhoff
Librarian | The Watermill Center
39 Watermill Towd Road, Water Mill, NY 11976
main: +1 631 726 4628 | mobile: +1 978 549 5561
JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY!
http://www.watermillcenter.org/support
SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER
BENEFIT & AUCTION | FADA: HOUSE OF MADNESS
http://www.watermillcenter.org/events/benefit
Connect with us on Facebook https://www.facebook.com/watermillcenter,
Twitter http://twitter.com/#%21/watermillcenter, Flickr,
http://www.flickr.com/photos/watermillresidencies/ Vimeo
https://vimeo.com/watermillcenter and Pinterest
http://pinterest.com/watermillcenter/. Join our email list!
http://watermillcenter.org/content/newsletter-signup
The Watermill Center is the principal operation of the Byrd Hoffman
Watermill Foundation,
a US 501(c)3 organization incorporated in the state of New York.
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Hi Deb,
With many thanks to Chris for the pointer to UC Berkeley's reports in
GitHub, from which I appropriated freely, here's a possible starting place
for experimenting with your SQL query:
https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases
This also suggests one potential technique - starting out with a very
basic initial query, without even any JOINs - and then incrementally
building and testing successively more complex queries - that can make it
easier to find and fix SQL errors and unanticipated results, during the
process of constructing more full-featured reports.
Aron
P.S. I'm not expert at this, so some comments, SQL techniques, etc. here
may be inaccurate, or at least sub-optimal. But these queries at least
*appear* to return sensible results, based on a small set of 17
CollectionObject (cataloging) records present in the Demo server's (
http://www.collectionspace.org/demo/) Core tenant.
On Tue, Jan 26, 2016 at 2:41 PM, Chris Hoffman <chris_h@berkeley.edu> wrote:
> Hi Deb,
>
> Not sure you’ve heard from anyone else yet, but I’ll point to the UC
> Berkeley reports in github:
>
> https://github.com/cspace-deployment/Tools/tree/master/reports
>
> I can’t get in and troubleshoot your query right now, but these are
> notoriously difficult! Good luck and let us know how it goes!
>
> Thanks,
> Chris
>
>
> On Jan 26, 2016, at 11:53 AM, Deb Verhoff <deb.verhoff@watermillcenter.org>
> wrote:
>
> I am trying to run Jaspersoft Studio report against our CSpace instance. I
> have the connection working and the general idea down.
>
> I see there is an issue with the SQL query I entered when generating a
> report. Can anyone share back their queries, which I could use or alter?
>
> SELECT
> co.c.objectnumber AS collectionobject_objectnumber,
> tg.title AS titlegroup_title,
> regexp_replace(co_c.computedCurrentLocation,'^.*\)''(.*)''$'. '\1')
> AS collectionObject_currentLocation
> FROM
> collectionobjects_common co_c
> LEFT OUTER JOIN hierarchy h1 ON (co_c.id = h1.id)
> INNER JOIN misc ON (misc.id=co_c.id AND misc.lifecyclestate <>
> 'deleted')
> INNER JOIN collectionspace_core core ON (core.id=co_c.id AND
> core.tenantid=11)
>
> LEFT OUTER JOIN hierarchy htg ON (co_c.id=htg.parentid AND htg.name
> ='collectionobjectnumber')
> LEFT OUTER JOIN titlegroup tg ON (htg.id=tg.id)
>
>
> Thanks,
> Deb
>
>
>
> --
> Deb Verhoff
> Librarian | The Watermill Center
> 39 Watermill Towd Road, Water Mill, NY 11976
> main: +1 631 726 4628 | mobile: +1 978 549 5561
>
> *JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY!
> <http://www.watermillcenter.org/support>*
>
> *SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER
> BENEFIT & AUCTION | FADA: HOUSE OF MADNESS
> <http://www.watermillcenter.org/events/benefit>*
>
> *Connect with us on Facebook <https://www.facebook.com/watermillcenter>,
> Twitter <http://twitter.com/#%21/watermillcenter>, Flickr,
> <http://www.flickr.com/photos/watermillresidencies/> Vimeo
> <https://vimeo.com/watermillcenter> and Pinterest
> <http://pinterest.com/watermillcenter/>. Join our email list!
> <http://watermillcenter.org/content/newsletter-signup>*
> The Watermill Center is the principal operation of the Byrd Hoffman
> Watermill Foundation,
> a US 501(c)3 organization incorporated in the state of New York.
> _______________________________________________
> Talk mailing list
> Talk@lists.collectionspace.org
>
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
>
>
>
> _______________________________________________
> Talk mailing list
> Talk@lists.collectionspace.org
>
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
>
>
MB
Michael Black
Wed, Jan 27, 2016 10:57 PM
Hi Deb,
I found a couple of problems with your query:
• The regex expression has a period where there should have been a comma;
• The table abbreviation ("co.c") has a period where there should have been
an underscore.
I'd also recommend changing this line:
LEFT OUTER JOIN hierarchy htg ON (co_c.id=htg.parentid AND htg.name
='collectionobjectnumber')
to this:
LEFT OUTER JOIN hierarchy htg ON (htg.parentid=co_c.id AND
htg.primarytype='titleGroup' AND htg.pos=0)
The resulting query works fine for me (once I change the tenantid):
SELECT
co_c.objectnumber AS collectionobject_objectnumber,
tg.title AS titlegroup_title,
regexp_replace(co_c.computedCurrentLocation,'^.)''(.)''$', '\1') AS
collectionObject_currentLocation
FROM
collectionobjects_common co_c
LEFT OUTER JOIN hierarchy h1 ON (co_c.id = h1.id)
INNER JOIN misc ON (misc.id=co_c.id AND misc.lifecyclestate <> 'deleted')
INNER JOIN collectionspace_core core ON (core.id=co_c.id AND
core.tenantid=11)
LEFT OUTER JOIN hierarchy htg ON (htg.parentid=co_c.id AND
htg.primarytype='titleGroup' AND htg.pos=0)
LEFT OUTER JOIN titlegroup tg ON (htg.id=tg.id)
Michael
On Tue, Jan 26, 2016 at 5:34 PM, Aron Roberts aron@socrates.berkeley.edu
wrote:
Hi Deb,
With many thanks to Chris for the pointer to UC Berkeley's reports in
GitHub, from which I appropriated freely, here's a possible starting place
for experimenting with your SQL query:
https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases
This also suggests one potential technique - starting out with a very
basic initial query, without even any JOINs - and then incrementally
building and testing successively more complex queries - that can make it
easier to find and fix SQL errors and unanticipated results, during the
process of constructing more full-featured reports.
Aron
P.S. I'm not expert at this, so some comments, SQL techniques, etc. here
may be inaccurate, or at least sub-optimal. But these queries at least
appear to return sensible results, based on a small set of 17
CollectionObject (cataloging) records present in the Demo server's (
http://www.collectionspace.org/demo/) Core tenant.
On Tue, Jan 26, 2016 at 2:41 PM, Chris Hoffman chris_h@berkeley.edu
wrote:
Hi Deb,
Not sure you’ve heard from anyone else yet, but I’ll point to the UC
Berkeley reports in github:
https://github.com/cspace-deployment/Tools/tree/master/reports
I can’t get in and troubleshoot your query right now, but these are
notoriously difficult! Good luck and let us know how it goes!
Thanks,
Chris
On Jan 26, 2016, at 11:53 AM, Deb Verhoff <
deb.verhoff@watermillcenter.org> wrote:
I am trying to run Jaspersoft Studio report against our CSpace instance.
I have the connection working and the general idea down.
I see there is an issue with the SQL query I entered when generating a
report. Can anyone share back their queries, which I could use or alter?
SELECT
co.c.objectnumber AS collectionobject_objectnumber,
tg.title AS titlegroup_title,
regexp_replace(co_c.computedCurrentLocation,'^.)''(.)''$'. '\1')
AS collectionObject_currentLocation
FROM
collectionobjects_common co_c
LEFT OUTER JOIN hierarchy h1 ON (co_c.id = h1.id)
INNER JOIN misc ON (misc.id=co_c.id AND misc.lifecyclestate <>
'deleted')
INNER JOIN collectionspace_core core ON (core.id=co_c.id AND
core.tenantid=11)
LEFT OUTER JOIN hierarchy htg ON (co_c.id=htg.parentid AND htg.name
='collectionobjectnumber')
LEFT OUTER JOIN titlegroup tg ON (htg.id=tg.id)
Thanks,
Deb
--
Deb Verhoff
Librarian | The Watermill Center
39 Watermill Towd Road, Water Mill, NY 11976
main: +1 631 726 4628 | mobile: +1 978 549 5561
JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY!
http://www.watermillcenter.org/support
SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER
BENEFIT & AUCTION | FADA: HOUSE OF MADNESS
http://www.watermillcenter.org/events/benefit
Connect with us on Facebook https://www.facebook.com/watermillcenter,
Twitter http://twitter.com/#%21/watermillcenter, Flickr,
http://www.flickr.com/photos/watermillresidencies/ Vimeo
https://vimeo.com/watermillcenter and Pinterest
http://pinterest.com/watermillcenter/. Join our email list!
http://watermillcenter.org/content/newsletter-signup
The Watermill Center is the principal operation of the Byrd Hoffman
Watermill Foundation,
a US 501(c)3 organization incorporated in the state of New York.
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
--
Michael Black, Ph.D.
Head of Research and Information
Phoebe A. Hearst Museum of Anthropology
University of California, Berkeley
mtblack@berkeley.edu
Hi Deb,
I found a couple of problems with your query:
• The regex expression has a period where there should have been a comma;
• The table abbreviation ("co.c") has a period where there should have been
an underscore.
I'd also recommend changing this line:
LEFT OUTER JOIN hierarchy htg ON (co_c.id=htg.parentid AND htg.name
='collectionobjectnumber')
to this:
LEFT OUTER JOIN hierarchy htg ON (htg.parentid=co_c.id AND
htg.primarytype='titleGroup' AND htg.pos=0)
The resulting query works fine for me (once I change the tenantid):
SELECT
co_c.objectnumber AS collectionobject_objectnumber,
tg.title AS titlegroup_title,
regexp_replace(co_c.computedCurrentLocation,'^.*\)''(.*)''$', '\1') AS
collectionObject_currentLocation
FROM
collectionobjects_common co_c
LEFT OUTER JOIN hierarchy h1 ON (co_c.id = h1.id)
INNER JOIN misc ON (misc.id=co_c.id AND misc.lifecyclestate <> 'deleted')
INNER JOIN collectionspace_core core ON (core.id=co_c.id AND
core.tenantid=11)
LEFT OUTER JOIN hierarchy htg ON (htg.parentid=co_c.id AND
htg.primarytype='titleGroup' AND htg.pos=0)
LEFT OUTER JOIN titlegroup tg ON (htg.id=tg.id)
Michael
On Tue, Jan 26, 2016 at 5:34 PM, Aron Roberts <aron@socrates.berkeley.edu>
wrote:
> Hi Deb,
>
> With many thanks to Chris for the pointer to UC Berkeley's reports in
> GitHub, from which I appropriated freely, here's a possible starting place
> for experimenting with your SQL query:
>
>
> https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases
>
> This also suggests one potential technique - starting out with a very
> basic initial query, without even any JOINs - and then incrementally
> building and testing successively more complex queries - that can make it
> easier to find and fix SQL errors and unanticipated results, during the
> process of constructing more full-featured reports.
>
> Aron
>
> P.S. I'm not expert at this, so some comments, SQL techniques, etc. here
> may be inaccurate, or at least sub-optimal. But these queries at least
> *appear* to return sensible results, based on a small set of 17
> CollectionObject (cataloging) records present in the Demo server's (
> http://www.collectionspace.org/demo/) Core tenant.
>
>
> On Tue, Jan 26, 2016 at 2:41 PM, Chris Hoffman <chris_h@berkeley.edu>
> wrote:
>
>> Hi Deb,
>>
>> Not sure you’ve heard from anyone else yet, but I’ll point to the UC
>> Berkeley reports in github:
>>
>> https://github.com/cspace-deployment/Tools/tree/master/reports
>>
>> I can’t get in and troubleshoot your query right now, but these are
>> notoriously difficult! Good luck and let us know how it goes!
>>
>> Thanks,
>> Chris
>>
>>
>> On Jan 26, 2016, at 11:53 AM, Deb Verhoff <
>> deb.verhoff@watermillcenter.org> wrote:
>>
>> I am trying to run Jaspersoft Studio report against our CSpace instance.
>> I have the connection working and the general idea down.
>>
>> I see there is an issue with the SQL query I entered when generating a
>> report. Can anyone share back their queries, which I could use or alter?
>>
>> SELECT
>> co.c.objectnumber AS collectionobject_objectnumber,
>> tg.title AS titlegroup_title,
>> regexp_replace(co_c.computedCurrentLocation,'^.*\)''(.*)''$'. '\1')
>> AS collectionObject_currentLocation
>> FROM
>> collectionobjects_common co_c
>> LEFT OUTER JOIN hierarchy h1 ON (co_c.id = h1.id)
>> INNER JOIN misc ON (misc.id=co_c.id AND misc.lifecyclestate <>
>> 'deleted')
>> INNER JOIN collectionspace_core core ON (core.id=co_c.id AND
>> core.tenantid=11)
>>
>> LEFT OUTER JOIN hierarchy htg ON (co_c.id=htg.parentid AND htg.name
>> ='collectionobjectnumber')
>> LEFT OUTER JOIN titlegroup tg ON (htg.id=tg.id)
>>
>>
>> Thanks,
>> Deb
>>
>>
>>
>> --
>> Deb Verhoff
>> Librarian | The Watermill Center
>> 39 Watermill Towd Road, Water Mill, NY 11976
>> main: +1 631 726 4628 | mobile: +1 978 549 5561
>>
>> *JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY!
>> <http://www.watermillcenter.org/support>*
>>
>> *SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER
>> BENEFIT & AUCTION | FADA: HOUSE OF MADNESS
>> <http://www.watermillcenter.org/events/benefit>*
>>
>> *Connect with us on Facebook <https://www.facebook.com/watermillcenter>,
>> Twitter <http://twitter.com/#%21/watermillcenter>, Flickr,
>> <http://www.flickr.com/photos/watermillresidencies/> Vimeo
>> <https://vimeo.com/watermillcenter> and Pinterest
>> <http://pinterest.com/watermillcenter/>. Join our email list!
>> <http://watermillcenter.org/content/newsletter-signup>*
>> The Watermill Center is the principal operation of the Byrd Hoffman
>> Watermill Foundation,
>> a US 501(c)3 organization incorporated in the state of New York.
>> _______________________________________________
>> Talk mailing list
>> Talk@lists.collectionspace.org
>>
>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
>>
>>
>>
>> _______________________________________________
>> Talk mailing list
>> Talk@lists.collectionspace.org
>>
>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
>>
>>
>
> _______________________________________________
> Talk mailing list
> Talk@lists.collectionspace.org
>
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
>
>
--
Michael Black, Ph.D.
Head of Research and Information
Phoebe A. Hearst Museum of Anthropology
University of California, Berkeley
mtblack@berkeley.edu
PM
Peter Murray
Thu, Jan 28, 2016 9:16 PM
I'll echo Aron's gratitude to the folks at UC Berkeley for posting their report source code on GitHub; it is very handy for getting examples of what is needed. As Aron's page points out, there are patterns to how CollectionSpace (or, more accurately, the Nuxeo system underneath CollectionSpace) breaks up records and fields within records, so with that knowledge it is also possible to build up patterns of how to recombine fields and tables to get to the information you need. In particular, his fourth and fifth steps of picking up records from just your tenant and excluding records that have been "soft deleted" in the database are key. I've also found that there are conditions that can be put on the JOINs that reduce the number of records being handled by the query and speed up (or, conversely slow down) searches by near orders of magnitude. I'm putting together a list of these patterns (e.g. if you have a repeating text field, here is the chunk of SQL you'll need to retrieve only the first or all of the available values) and will be publishing them on the CollectionSpace wiki. In the meantime, Aron's suggestions of building up SQL queries step by step plus looking at what others have done are good ones.
Peter
On Jan 26, 2016, at 8:34 PM, Aron Roberts aron@socrates.berkeley.edu wrote:
Hi Deb,
With many thanks to Chris for the pointer to UC Berkeley's reports in GitHub, from which I appropriated freely, here's a possible starting place for experimenting with your SQL query:
https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases
This also suggests one potential technique - starting out with a very basic initial query, without even any JOINs - and then incrementally building and testing successively more complex queries - that can make it easier to find and fix SQL errors and unanticipated results, during the process of constructing more full-featured reports.
Aron
P.S. I'm not expert at this, so some comments, SQL techniques, etc. here may be inaccurate, or at least sub-optimal. But these queries at least appear to return sensible results, based on a small set of 17 CollectionObject (cataloging) records present in the Demo server's (http://www.collectionspace.org/demo/ http://www.collectionspace.org/demo/) Core tenant.
On Tue, Jan 26, 2016 at 2:41 PM, Chris Hoffman <chris_h@berkeley.edu mailto:chris_h@berkeley.edu> wrote:
Hi Deb,
Not sure you’ve heard from anyone else yet, but I’ll point to the UC Berkeley reports in github:
https://github.com/cspace-deployment/Tools/tree/master/reports https://github.com/cspace-deployment/Tools/tree/master/reports
I can’t get in and troubleshoot your query right now, but these are notoriously difficult! Good luck and let us know how it goes!
Thanks,
Chris
On Jan 26, 2016, at 11:53 AM, Deb Verhoff <deb.verhoff@watermillcenter.org mailto:deb.verhoff@watermillcenter.org> wrote:
I am trying to run Jaspersoft Studio report against our CSpace instance. I have the connection working and the general idea down.
I see there is an issue with the SQL query I entered when generating a report. Can anyone share back their queries, which I could use or alter?
SELECT
co.c.objectnumber AS collectionobject_objectnumber,
tg.title AS titlegroup_title,
regexp_replace(co_c.computedCurrentLocation,'^.)''(.)''$'. '\1')
AS collectionObject_currentLocation
FROM
collectionobjects_common co_c
LEFT OUTER JOIN hierarchy h1 ON (co_c.id http://co_c.id/ = h1.id http://h1.id/)
INNER JOIN misc ON (misc.id http://misc.id/=co_c.id http://co_c.id/ AND misc.lifecyclestate <> 'deleted')
INNER JOIN collectionspace_core core ON (core.id http://core.id/=co_c.id http://co_c.id/ AND core.tenantid=11)
LEFT OUTER JOIN hierarchy htg ON (co_c.id http://co_c.id/=htg.parentid AND htg.name http://htg.name/='collectionobjectnumber')
LEFT OUTER JOIN titlegroup tg ON (htg.id http://htg.id/=tg.id http://tg.id/)
Thanks,
Deb
--
Deb Verhoff
Librarian | The Watermill Center
39 Watermill Towd Road, Water Mill, NY 11976
main: +1 631 726 4628 tel:%2B1%20631%20726%204628 | mobile: +1 978 549 5561 tel:%2B1%20978%20549%205561
JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY! http://www.watermillcenter.org/support
SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER BENEFIT & AUCTION | FADA: HOUSE OF MADNESS http://www.watermillcenter.org/events/benefit
Connect with us on Facebook https://www.facebook.com/watermillcenter, Twitter http://twitter.com/#%21/watermillcenter, Flickr, http://www.flickr.com/photos/watermillresidencies/ Vimeo https://vimeo.com/watermillcenter and Pinterest http://pinterest.com/watermillcenter/. Join our email list! http://watermillcenter.org/content/newsletter-signup
The Watermill Center is the principal operation of the Byrd Hoffman Watermill Foundation,
a US 501(c)3 organization incorporated in the state of New York.
Talk mailing list
Talk@lists.collectionspace.org mailto:Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company
I'll echo Aron's gratitude to the folks at UC Berkeley for posting their report source code on GitHub; it is very handy for getting examples of what is needed. As Aron's page points out, there are patterns to how CollectionSpace (or, more accurately, the Nuxeo system underneath CollectionSpace) breaks up records and fields within records, so with that knowledge it is also possible to build up patterns of how to recombine fields and tables to get to the information you need. In particular, his fourth and fifth steps of picking up records from just your tenant and excluding records that have been "soft deleted" in the database are key. I've also found that there are conditions that can be put on the JOINs that reduce the number of records being handled by the query and speed up (or, conversely slow down) searches by near orders of magnitude. I'm putting together a list of these patterns (e.g. if you have a repeating text field, here is the chunk of SQL you'll need to retrieve only the first or all of the available values) and will be publishing them on the CollectionSpace wiki. In the meantime, Aron's suggestions of building up SQL queries step by step plus looking at what others have done are good ones.
Peter
> On Jan 26, 2016, at 8:34 PM, Aron Roberts <aron@socrates.berkeley.edu> wrote:
>
> Hi Deb,
>
> With many thanks to Chris for the pointer to UC Berkeley's reports in GitHub, from which I appropriated freely, here's a possible starting place for experimenting with your SQL query:
>
> https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases <https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases>
>
> This also suggests one potential technique - starting out with a very basic initial query, without even any JOINs - and then incrementally building and testing successively more complex queries - that can make it easier to find and fix SQL errors and unanticipated results, during the process of constructing more full-featured reports.
>
> Aron
>
> P.S. I'm not expert at this, so some comments, SQL techniques, etc. here may be inaccurate, or at least sub-optimal. But these queries at least *appear* to return sensible results, based on a small set of 17 CollectionObject (cataloging) records present in the Demo server's (http://www.collectionspace.org/demo/ <http://www.collectionspace.org/demo/>) Core tenant.
>
> On Tue, Jan 26, 2016 at 2:41 PM, Chris Hoffman <chris_h@berkeley.edu <mailto:chris_h@berkeley.edu>> wrote:
> Hi Deb,
>
> Not sure you’ve heard from anyone else yet, but I’ll point to the UC Berkeley reports in github:
>
> https://github.com/cspace-deployment/Tools/tree/master/reports <https://github.com/cspace-deployment/Tools/tree/master/reports>
>
> I can’t get in and troubleshoot your query right now, but these are notoriously difficult! Good luck and let us know how it goes!
>
> Thanks,
> Chris
>
>
>> On Jan 26, 2016, at 11:53 AM, Deb Verhoff <deb.verhoff@watermillcenter.org <mailto:deb.verhoff@watermillcenter.org>> wrote:
>>
>> I am trying to run Jaspersoft Studio report against our CSpace instance. I have the connection working and the general idea down.
>>
>> I see there is an issue with the SQL query I entered when generating a report. Can anyone share back their queries, which I could use or alter?
>>
>> SELECT
>> co.c.objectnumber AS collectionobject_objectnumber,
>> tg.title AS titlegroup_title,
>> regexp_replace(co_c.computedCurrentLocation,'^.*\)''(.*)''$'. '\1')
>> AS collectionObject_currentLocation
>> FROM
>> collectionobjects_common co_c
>> LEFT OUTER JOIN hierarchy h1 ON (co_c.id <http://co_c.id/> = h1.id <http://h1.id/>)
>> INNER JOIN misc ON (misc.id <http://misc.id/>=co_c.id <http://co_c.id/> AND misc.lifecyclestate <> 'deleted')
>> INNER JOIN collectionspace_core core ON (core.id <http://core.id/>=co_c.id <http://co_c.id/> AND core.tenantid=11)
>>
>> LEFT OUTER JOIN hierarchy htg ON (co_c.id <http://co_c.id/>=htg.parentid AND htg.name <http://htg.name/>='collectionobjectnumber')
>> LEFT OUTER JOIN titlegroup tg ON (htg.id <http://htg.id/>=tg.id <http://tg.id/>)
>>
>>
>> Thanks,
>> Deb
>>
>>
>>
>> --
>> Deb Verhoff
>> Librarian | The Watermill Center
>> 39 Watermill Towd Road, Water Mill, NY 11976
>> main: +1 631 726 4628 <tel:%2B1%20631%20726%204628> | mobile: +1 978 549 5561 <tel:%2B1%20978%20549%205561>
>> JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY! <http://www.watermillcenter.org/support>
>>
>> SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER BENEFIT & AUCTION | FADA: HOUSE OF MADNESS <http://www.watermillcenter.org/events/benefit>
>>
>> Connect with us on Facebook <https://www.facebook.com/watermillcenter>, Twitter <http://twitter.com/#%21/watermillcenter>, Flickr, <http://www.flickr.com/photos/watermillresidencies/> Vimeo <https://vimeo.com/watermillcenter> and Pinterest <http://pinterest.com/watermillcenter/>. Join our email list! <http://watermillcenter.org/content/newsletter-signup>
>> The Watermill Center is the principal operation of the Byrd Hoffman Watermill Foundation,
>> a US 501(c)3 organization incorporated in the state of New York.
>> _______________________________________________
>> Talk mailing list
>> Talk@lists.collectionspace.org <mailto:Talk@lists.collectionspace.org>
>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org <http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org>
>
>
> _______________________________________________
> Talk mailing list
> Talk@lists.collectionspace.org <mailto:Talk@lists.collectionspace.org>
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org <http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org>
>
>
> _______________________________________________
> Talk mailing list
> Talk@lists.collectionspace.org
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
--
Peter Murray
Dev/Ops Lead and Project Manager
Cherry Hill Company
AR
Aron Roberts
Thu, Jan 28, 2016 10:02 PM
Many thanks, Peter - am looking forward to seeing your tips on patterns for
building SQL queries for CSpace reporting.
We're now tracking work (by any of us) on writing tutorial documentation
for CSpace SQL query writers via this new issue:
https://issues.collectionspace.org/browse/CSPACE-6879
Your response, along with a note we received from Michael Black, have been
added as comments to that issue. (Thanks again to both you and Michael!)
Aron
On Thu, Jan 28, 2016 at 1:16 PM, Peter Murray pmurray@chillco.com wrote:
I'll echo Aron's gratitude to the folks at UC Berkeley for posting their
report source code on GitHub; it is very handy for getting examples of what
is needed. As Aron's page points out, there are patterns to how
CollectionSpace (or, more accurately, the Nuxeo system underneath
CollectionSpace) breaks up records and fields within records, so with that
knowledge it is also possible to build up patterns of how to recombine
fields and tables to get to the information you need. In particular, his
fourth and fifth steps of picking up records from just your tenant and
excluding records that have been "soft deleted" in the database are key.
I've also found that there are conditions that can be put on the JOINs that
reduce the number of records being handled by the query and speed up (or,
conversely slow down) searches by near orders of magnitude. I'm putting
together a list of these patterns (e.g. if you have a repeating text field,
here is the chunk of SQL you'll need to retrieve only the first or all of
the available values) and will be publishing them on the CollectionSpace
wiki. In the meantime, Aron's suggestions of building up SQL queries step
by step plus looking at what others have done are good ones.
Peter
On Jan 26, 2016, at 8:34 PM, Aron Roberts aron@socrates.berkeley.edu
wrote:
Hi Deb,
With many thanks to Chris for the pointer to UC Berkeley's reports in
GitHub, from which I appropriated freely, here's a possible starting place
for experimenting with your SQL query:
https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases
This also suggests one potential technique - starting out with a very
basic initial query, without even any JOINs - and then incrementally
building and testing successively more complex queries - that can make it
easier to find and fix SQL errors and unanticipated results, during the
process of constructing more full-featured reports.
Aron
P.S. I'm not expert at this, so some comments, SQL techniques, etc. here
may be inaccurate, or at least sub-optimal. But these queries at least
appear to return sensible results, based on a small set of 17
CollectionObject (cataloging) records present in the Demo server's (
http://www.collectionspace.org/demo/) Core tenant.
On Tue, Jan 26, 2016 at 2:41 PM, Chris Hoffman chris_h@berkeley.edu
wrote:
Hi Deb,
Not sure you’ve heard from anyone else yet, but I’ll point to the UC
Berkeley reports in github:
https://github.com/cspace-deployment/Tools/tree/master/reports
I can’t get in and troubleshoot your query right now, but these are
notoriously difficult! Good luck and let us know how it goes!
Thanks,
Chris
On Jan 26, 2016, at 11:53 AM, Deb Verhoff <
deb.verhoff@watermillcenter.org> wrote:
I am trying to run Jaspersoft Studio report against our CSpace instance.
I have the connection working and the general idea down.
I see there is an issue with the SQL query I entered when generating a
report. Can anyone share back their queries, which I could use or alter?
SELECT
co.c.objectnumber AS collectionobject_objectnumber,
tg.title AS titlegroup_title,
regexp_replace(co_c.computedCurrentLocation,'^.)''(.)''$'. '\1')
AS collectionObject_currentLocation
FROM
collectionobjects_common co_c
LEFT OUTER JOIN hierarchy h1 ON (co_c.id = h1.id)
INNER JOIN misc ON (misc.id=co_c.id AND misc.lifecyclestate <>
'deleted')
INNER JOIN collectionspace_core core ON (core.id=co_c.id AND
core.tenantid=11)
LEFT OUTER JOIN hierarchy htg ON (co_c.id=htg.parentid AND htg.name
='collectionobjectnumber')
LEFT OUTER JOIN titlegroup tg ON (htg.id=tg.id)
Thanks,
Deb
--
Deb Verhoff
Librarian | The Watermill Center
39 Watermill Towd Road, Water Mill, NY 11976
main: +1 631 726 4628 | mobile: +1 978 549 5561
JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY!
http://www.watermillcenter.org/support
SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER
BENEFIT & AUCTION | FADA: HOUSE OF MADNESS
http://www.watermillcenter.org/events/benefit
Connect with us on Facebook https://www.facebook.com/watermillcenter,
Twitter http://twitter.com/#%21/watermillcenter, Flickr,
http://www.flickr.com/photos/watermillresidencies/ Vimeo
https://vimeo.com/watermillcenter and Pinterest
http://pinterest.com/watermillcenter/. Join our email list!
http://watermillcenter.org/content/newsletter-signup
The Watermill Center is the principal operation of the Byrd Hoffman
Watermill Foundation,
a US 501(c)3 organization incorporated in the state of New York.
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Talk mailing list
Talk@lists.collectionspace.org
http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
Many thanks, Peter - am looking forward to seeing your tips on patterns for
building SQL queries for CSpace reporting.
We're now tracking work (by any of us) on writing tutorial documentation
for CSpace SQL query writers via this new issue:
https://issues.collectionspace.org/browse/CSPACE-6879
Your response, along with a note we received from Michael Black, have been
added as comments to that issue. (Thanks again to both you and Michael!)
Aron
On Thu, Jan 28, 2016 at 1:16 PM, Peter Murray <pmurray@chillco.com> wrote:
> I'll echo Aron's gratitude to the folks at UC Berkeley for posting their
> report source code on GitHub; it is very handy for getting examples of what
> is needed. As Aron's page points out, there are patterns to how
> CollectionSpace (or, more accurately, the Nuxeo system underneath
> CollectionSpace) breaks up records and fields within records, so with that
> knowledge it is also possible to build up patterns of how to recombine
> fields and tables to get to the information you need. In particular, his
> fourth and fifth steps of picking up records from just your tenant and
> excluding records that have been "soft deleted" in the database are key.
> I've also found that there are conditions that can be put on the JOINs that
> reduce the number of records being handled by the query and speed up (or,
> conversely slow down) searches by near orders of magnitude. I'm putting
> together a list of these patterns (e.g. if you have a repeating text field,
> here is the chunk of SQL you'll need to retrieve only the first or all of
> the available values) and will be publishing them on the CollectionSpace
> wiki. In the meantime, Aron's suggestions of building up SQL queries step
> by step plus looking at what others have done are good ones.
>
>
> Peter
>
> On Jan 26, 2016, at 8:34 PM, Aron Roberts <aron@socrates.berkeley.edu>
> wrote:
>
> Hi Deb,
>
> With many thanks to Chris for the pointer to UC Berkeley's reports in
> GitHub, from which I appropriated freely, here's a possible starting place
> for experimenting with your SQL query:
>
>
> https://wiki.collectionspace.org/display/~aronr/Getting+started+with+SQL+queries+of+the+CollectionSpace+databases
>
> This also suggests one potential technique - starting out with a very
> basic initial query, without even any JOINs - and then incrementally
> building and testing successively more complex queries - that can make it
> easier to find and fix SQL errors and unanticipated results, during the
> process of constructing more full-featured reports.
>
> Aron
>
> P.S. I'm not expert at this, so some comments, SQL techniques, etc. here
> may be inaccurate, or at least sub-optimal. But these queries at least
> *appear* to return sensible results, based on a small set of 17
> CollectionObject (cataloging) records present in the Demo server's (
> http://www.collectionspace.org/demo/) Core tenant.
>
> On Tue, Jan 26, 2016 at 2:41 PM, Chris Hoffman <chris_h@berkeley.edu>
> wrote:
>
>> Hi Deb,
>>
>> Not sure you’ve heard from anyone else yet, but I’ll point to the UC
>> Berkeley reports in github:
>>
>> https://github.com/cspace-deployment/Tools/tree/master/reports
>>
>> I can’t get in and troubleshoot your query right now, but these are
>> notoriously difficult! Good luck and let us know how it goes!
>>
>> Thanks,
>> Chris
>>
>>
>> On Jan 26, 2016, at 11:53 AM, Deb Verhoff <
>> deb.verhoff@watermillcenter.org> wrote:
>>
>> I am trying to run Jaspersoft Studio report against our CSpace instance.
>> I have the connection working and the general idea down.
>>
>> I see there is an issue with the SQL query I entered when generating a
>> report. Can anyone share back their queries, which I could use or alter?
>>
>> SELECT
>> co.c.objectnumber AS collectionobject_objectnumber,
>> tg.title AS titlegroup_title,
>> regexp_replace(co_c.computedCurrentLocation,'^.*\)''(.*)''$'. '\1')
>> AS collectionObject_currentLocation
>> FROM
>> collectionobjects_common co_c
>> LEFT OUTER JOIN hierarchy h1 ON (co_c.id = h1.id)
>> INNER JOIN misc ON (misc.id=co_c.id AND misc.lifecyclestate <>
>> 'deleted')
>> INNER JOIN collectionspace_core core ON (core.id=co_c.id AND
>> core.tenantid=11)
>>
>> LEFT OUTER JOIN hierarchy htg ON (co_c.id=htg.parentid AND htg.name
>> ='collectionobjectnumber')
>> LEFT OUTER JOIN titlegroup tg ON (htg.id=tg.id)
>>
>>
>> Thanks,
>> Deb
>>
>>
>>
>> --
>> Deb Verhoff
>> Librarian | The Watermill Center
>> 39 Watermill Towd Road, Water Mill, NY 11976
>> main: +1 631 726 4628 | mobile: +1 978 549 5561
>>
>> *JOIN US | BECOME A MEMBER OF THE WATERMILL CENTER TODAY!
>> <http://www.watermillcenter.org/support>*
>>
>> *SAVE THE DATE: JULY 30, 2016 | THE 23RD ANNUAL WATERMILL CENTER SUMMER
>> BENEFIT & AUCTION | FADA: HOUSE OF MADNESS
>> <http://www.watermillcenter.org/events/benefit>*
>>
>> *Connect with us on Facebook <https://www.facebook.com/watermillcenter>,
>> Twitter <http://twitter.com/#%21/watermillcenter>, Flickr,
>> <http://www.flickr.com/photos/watermillresidencies/> Vimeo
>> <https://vimeo.com/watermillcenter> and Pinterest
>> <http://pinterest.com/watermillcenter/>. Join our email list!
>> <http://watermillcenter.org/content/newsletter-signup>*
>> The Watermill Center is the principal operation of the Byrd Hoffman
>> Watermill Foundation,
>> a US 501(c)3 organization incorporated in the state of New York.
>> _______________________________________________
>> Talk mailing list
>> Talk@lists.collectionspace.org
>>
>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
>>
>>
>>
>> _______________________________________________
>> Talk mailing list
>> Talk@lists.collectionspace.org
>>
>> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
>>
>>
> _______________________________________________
> Talk mailing list
> Talk@lists.collectionspace.org
>
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
>
>
>
> --
> Peter Murray
> Dev/Ops Lead and Project Manager
> Cherry Hill Company
>
>
> _______________________________________________
> Talk mailing list
> Talk@lists.collectionspace.org
>
> http://lists.collectionspace.org/mailman/listinfo/talk_lists.collectionspace.org
>
>