Skip to content

Instantly share code, notes, and snippets.

@sandbergja
sandbergja / no_oclc_es
Last active January 8, 2017 12:54
Spanish materials no OCLC
tcn | call_number | barcode | title
--------+-------------------------------+----------------+--------------------------------------------------------------------------------------------------------------------------------------------------
261020 | E121 .A713 1986 | 38813000020893 | {"America in Europe :"}
261063 | CB103 .O72 | 38813000029829 | {"The revolt of the masses;"}
261357 | F864 .V53 V.1 | 38813000099194 | {"A natural and civil history of California."}
261997 | E184.M5 D85 | 38813000634354 | {"Introduction to Chicano studies;"}
262906 | NK4123 .L47 1974 | 38813000322794 | {"Spanish folk ceramics of today."}
264971 | F1230 .G62 | 38813000327702 | {"The conquest of the Weast India."}
265206 | E125.O6 D4713 1988 | 38813000036659 | {"The discovery of the Amazon /"}
266701 | D20 .H56 2000 V.4
@sandbergja
sandbergja / ESOL info in 590s
Last active February 4, 2016 21:29
ESOL info in 590s
252892 | {"This is a Level Two ESOL book. It is a little more difficult to read than Level One books.","ESOL books."}
267561 | {"Two copies are in the collection: one in the stacks and one in with young adult books.","ESOL books.","This is a Level Three ESOL book. It is a quite difficult to read."}
260520 | {"The book, The Call of the Wild, is a Level Two ESOL book. It is a little more difficult to read than Level One books.","ESOL books."}
256692 | {"Banned book.","ESOL books.","This is a Level Three ESOL book. It is a quite difficult to read."}
278496 | {"The book, Little Women, is a Level Two ESOL book. It is a little more difficult to read than Level One books.","ESOL books."}
281284 | {"This is a Level Two ESOL book. It is a little more difficult to read than Level One books.","ESOL books."}
280360 | {"This is a Level Two ESOL book. It is a little more difficult to read than Level One books.","ESOL books."}
273720 | {"This is a Level Two ESOL book. It is a little more difficult to read than Level
@sandbergja
sandbergja / 590s to remove.sql
Last active February 13, 2016 18:40
590s to remove
SELECT DISTINCT b.id as TCN, xpath('//m:datafield[@tag="590"]/m:subfield[@code="a"]/text()', b.marc::xml, ARRAY[ARRAY['m','http://www.loc.gov/MARC21/slim']])::VARCHAR as field590
FROM biblio.record_entry b
INNER JOIN asset.call_number cn ON cn.record=b.id
INNER JOIN asset.copy c ON c.call_number=cn.id
INNER JOIN actor.org_unit ou on ou.id=c.circ_lib
WHERE b.deleted=FALSE
AND c.location !=238 -- LBCC ILL
AND c.location !=237 -- LBCC's Servc-Desk
AND c.location !=229 -- LBCC's Reserves
AND cn.label NOT LIKE 'ILL%'
@sandbergja
sandbergja / TCNs for LBCC records with custom 653s
Created February 1, 2016 23:50
TCNs for LBCC records with custom 653s
499028
278969
284568
298562
286830
288270
284779
286298
272717
256692
@sandbergja
sandbergja / gist:2434d7723de528de014e
Created February 1, 2016 23:19
non-standard 653s
502179 | {"Cultural lag",Geschichte,"Intercultural communication","Personality and culture","Social evolution"}
3445 | {"Military equipment: Firearms"}
3902 | {"Multiregional human evolution."}
14781 | {Basketball,Tactics}
15689 | {"Eastern Europe","History, 1914-"}
25004 | {"Social conditions",Moscow}
257762 | {China,Antiquities}
257807 | {Paintings,"Special subjects",Prostitution,France}
258778 | {"Colour - Anthroposophical viewpoints"}
252727 | {Politics,"History, 1948-",Israel}
@sandbergja
sandbergja / oclc.sql
Created January 31, 2016 17:47
SQL commands for OCLC project
--- List of OCLC numbers for our OU
SELECT xpath('//m:datafield[@tag="035"]/m:subfield[@code="a"]/text()', b.marc::xml, ARRAY[ARRAY['m','http://www.loc.gov/MARC21/slim']])::VARCHAR as oclc
FROM biblio.record_entry b
INNER JOIN asset.call_number cn ON cn.record=b.id
INNER JOIN asset.copy c ON c.call_number=cn.id
INNER JOIN actor.org_unit ou on ou.id=c.circ_lib
WHERE b.deleted=FALSE
AND b.marc LIKE '%tag="035%'
AND (b.marc LIKE '%OCoLC%'
OR b.marc LIKE '%ocn%'
@sandbergja
sandbergja / 035_not_oclc_multiple_libs
Last active August 27, 2016 23:21
035 not OCLC affecting multiple libraries
2 | 260843
2 | 250742
2 | 264195
2 | 262666
2 | 265558
2 | 255010
2 | 266134
2 | 273281
2 | 252790
2 | 265212
tcn | call_number | barcode | title
--------+-----------------------------+----------------+-------------------------------------------------------------------------------------------------
272897 | R692 .B69 2002 | 38813000873838 | {"Women in medicine :"}
251635 | R708 .T48 1993 | 38813000689838 | {"The fragile species /"}
267659 | R723 .W34 | 38813000121295 | {"Ways of health :"}
266309 | R724 .B753 1993 | 38813000698763 | {"Life and death :"}
266534 | R724 .P82 1993 | 38813000777195 | {"Ethical dimensions in the health professions /"}
270539 | R724 .S55 1995 | 38813000721235 | {"Rethinking life & death :"}
267921 | R725.5 .K58 | 38813000187353 | {"The practice of death /"}
256050 | R726 .A74 1995 | 38813000757353 | {"Arguing euthanasia :"}
@sandbergja
sandbergja / 035 not OCLC
Last active December 3, 2015 21:33
these lbcc records contain 035 fields, but w/o OCLC numbers
268728 | BF723.C5 S6 1997 | 38813000802035 | {"A Piaget primer :"}
268730 | HD58.82 .D36 1999 C.2 | 38813000828345 | {"The dance of change :"}
268733 | HB501 .M36 V.2 | 38813000801987 | {"Capital :"}
268734 | M1670.J35 A3 1998 | 38813000881278 | {"African American folk rhythms"}
268735 | RG852 .H89 1998 | 38813000806275 | {"A mother's tears :"}
268737 | QA244 .S55 1998 | 38813000805772 | {"Fermat's enigma :"}
268739 | RC903.9 .R67 1987 | 38813000806812 | {"Pathophysiology of renal disease /"}
268740 | HF5549.5.M5 F47 1999 | 38813000806713 | {"Race, gender, and rhetoric :"}
268741 | LB1060 .M677 1998 | 38813000805723 | {"Enhancing learning in training and adult education /"}
268746 | HQ759.915 .K56 1999 | 38813000813206 | {"Single parents :"}
@sandbergja
sandbergja / No 035
Last active December 1, 2015 23:39
tcn | call_number | barcode | title | issue
--------+----------------------------+----------------+-----------------------------------------------------------------------------------------------------------+--------
158504 | TN675.5.Y54 2011 | 38813001123696 | {"The life and career of a metals pioneer :"} | No 035
273308 | TL325 .R3 2003 C.2 | 38813000904021 | {"Real world driver"} | No 035
273407 | TK146 .B27 2002 BOOK | 38813000892606 | {"Basic electrical CD-ROM "} | No 035
273894 | N7430 .P70 2004 C.3 | 38813000904336 | {"ArtNotes :"} | No 03