This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0"; | |
declare namespace ead="urn:isbn:1-931666-22-9"; | |
declare namespace xlink = "http://www.w3.org/1999/xlink"; | |
<root> | |
{ | |
for $ead in ead:ead | |
let $doc := base-uri($ead) | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "1.0"; | |
declare namespace ead="urn:isbn:1-931666-22-9"; | |
declare namespace xlink = "http://www.w3.org/1999/xlink"; | |
<foldernum> | |
{ | |
for $ead in ead:ead | |
let $doc := base-uri($ead) | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.0"; | |
declare namespace ead="urn:isbn:1-931666-22-9"; | |
declare namespace xlink = "http://www.w3.org/1999/xlink"; | |
for $container in ead:ead//ead:dsc/ead:c[2]//ead:did/ead:container[@type eq "Box"] | |
let $unittitle := $container/parent::ead:did/ead:unittitle | |
where $container = 10 | |
return | |
replace node $unittitle with <unittitle><title render="italic">{$unittitle/text()}</title></unittitle> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.0"; | |
declare namespace ead="urn:isbn:1-931666-22-9"; | |
declare namespace xlink = "http://www.w3.org/1999/xlink"; | |
declare namespace functx = "http://www.functx.com"; | |
<restrictions> | |
{ | |
for $ead in ead:ead | |
let $doc := base-uri($ead) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
xquery version "3.0"; | |
declare namespace ead="urn:isbn:1-931666-22-9"; | |
declare namespace xlink = "http://www.w3.org/1999/xlink"; | |
<dupes> | |
{ | |
for $ead in ead:ead | |
let $doc := base-uri($ead) | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
start transaction; | |
UPDATE schema.ArchDescriptionInstances AS ArchDesc | |
JOIN ( | |
SELECT barcode, userDefinedString1, userDefinedString2, locationId, userDefinedBoolean1, userDefinedBoolean2 | |
FROM schema.ArchDescriptionInstances | |
WHERE userDefinedString1 = "{{{bibid}}}" | |
) | |
AS newdata | |
ON newdata.barcode=ArchDesc.barcode | |
SET ArchDesc.userDefinedString1 = newdata.UserDefinedString1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select barcode, | |
group_concat(distinct coalesce(container1NumericIndicator, container1AlphaNumIndicator) ) | |
from yale.ArchDescriptionInstances | |
where barcode != "" | |
group by barcode | |
having count(barcode) > 1 | |
and count(distinct coalesce(container1NumericIndicator, container1AlphaNumIndicator)) > 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select | |
concat(r.resourceIdentifier1, | |
' ', | |
lpad(r.resourceIdentifier2, 4, '00')) 'Collection', | |
r.title 'Collection Title', | |
series.subdivisionIdentifier 'Series/Accession Number', | |
series.title 'Series Title', | |
rc.title 'Component Title', | |
rc.dateExpression 'Component Date', | |
adi.container1Type 'Container Type', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE ArchDescriptionInstances SET barcode = instanceType WHERE instanceType REGEXP '^[0-9]{14}$'; | |
UPDATE ArchDescriptionInstances SET instanceType = 'Mixed materials' WHERE instanceType REGEXP '^[0-9]{14}$'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
CONCAT( | |
r.resourceIdentifier1 | |
, ' ' | |
, LPAD(r.resourceIdentifier2, 4, '00') | |
) AS Collection | |
, r.title AS CollectionTitle | |
, series.subdivisionIdentifier AS SeriesTitle | |
, series.title AS SeriesTitle | |
, rc.title AS ComponentTitle |
OlderNewer