Skip to main content
ExLibris
Ex Libris Knowledge Center

SQL query to extract datasets of locally-created authority records

 

  • Product: Aleph
  • Product Version: 20, 21, 22, 23
  • Relevant for Installation Type: Dedicated-Direct, Direct, Local, Total Care

 

Question    
How to generate an SQL query to extract datasets for locally-created and locally-modified records from the xxx10 (Authorities). 

What entities and attributes could be used to make a relationship and get the required result sets?

 

Answer    
Aleph doc (Z00) records, such as, the bib records or the authority records, cannot be queried directly by SQL because their variable-length fields (everything from the 010 field-up) is stored in Binary Long OBject format, which is not searchable by SQL. (Note: If you have the z00r table built in the alb10 library, you *could* query that table via SQL.) 

This is the best way to do this: 

1. If the xxx10 MARC tag being queried is indexed, then either 

a. search it in the GUI (the binoculars) and then click on "Save" to save it to the server; or 
b. run the GUI ret-03 Service to retrieve the record numbers of records which satisfy the query 

2. If the MARC tag being queried is not indexed, then run the xxx10 GUI ret-01 Service. 

In either case the result set will be a file with lines looking like this: 

000123456XXX10 
000234567XXX10 
<etc.> 

3. Take the file from step 1 or 2 and use it as input to the xxx10 print-03 Service. Either the entire record or a desired set of tags from the record can be specified in this service's "Field"s parameters.

 

 


  • Article last edited: 02-Mar-2016
  • Was this article helpful?