marc_export documentation sql example fix

Bug #2029160 reported by Josh Stompro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Medium
Unassigned
3.10
Fix Released
Medium
Unassigned

Bug Description

I was just trying out an export using the example sql at
https://docs.evergreen-ils.org/3.2/_marc_export_exporting_bibliographic_records_into_marc_files.html

and noticed that the sql query there needs to exclude deleted asset.call_number entries or the results will be incorrect.

SELECT DISTINCT bre.id FROM biblio.record_entry AS bre
    JOIN asset.call_number AS acn ON acn.record = bre.id
    WHERE bre.deleted='false' and owning_lib=101 \g /home/opensrf/records.txt;

Should be

SELECT DISTINCT bre.id FROM biblio.record_entry AS bre
    JOIN asset.call_number AS acn ON acn.record = bre.id and not acn.deleted
    WHERE bre.deleted='false' and owning_lib=101 \g /home/opensrf/records.txt;

Need to update it at
https://git.evergreen-ils.org/?p=Evergreen.git;a=blob;f=docs/modules/development/pages/support_scripts.adoc;hb=HEAD

Revision history for this message
Josh Stompro (u-launchpad-stompro-org) wrote :
tags: added: pullrequest
Revision history for this message
Jane Sandberg (sandbergja) wrote :

Good catch, thanks, Josh! Pushed to rel_3_10 and above.

Changed in evergreen:
status: New → Fix Committed
importance: Undecided → Medium
milestone: none → 3.11.2
tags: added: signedoff
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.