Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Is there an easy way to delete all records?

Help
2004-10-04
2013-05-30
  • I've been experimenting with a xsl stylesheet that transforms my kludgy personal xml catalog into MarcXML and then using the MarcEdit tool to put that into Marc format.  Upload has been wonderfully successful but I'm still tweaking the transform and now need to delete all bibliographies.  Any advice would be appreciated.

     
    • Micah Stetson
      Micah Stetson
      2004-10-04

      There's no way in the UI, but if you connect to the database with a MySQL client (i.e. PhpMyAdmin), you can just run these commands:

      delete from biblio_hold;
      delete from biblio_status_hist;
      delete from biblio_copy;
      delete from biblio_field;
      delete from biblio;

      That should leave you with an empty catalog, but all of your settings should be intact.

      Micah

       
    • Worked like a charm.  Thank you very much!

       
    • May you share your results with MarcXML, xsl and MarcEdit Tool?

      Thanks,

      MSS

       
    • Sure.

      The basic idea is straight-forward.

      1) I have an xml document where records take the form:

      <reference>
          <type>Book</type>
          <collection>Adult Nonfiction</collection>
          <language>eng</language>
          <author>Alcock, J.</author>
          <year>1984</year>
          <title>Animal behavior:  An evolutionary approach</title>
          <placepublished>Sunderland, MA</placepublished>
          <publisher>Sinauer Associates</publisher>
          <edition>3rd</edition>
          <cat1>Psychology</cat1>
      </reference>

      2) The xsl transformation converts this to marcXML, inserts a phony leader tag, and puts it into the following form:

      <marc:record>
          <marc:leader>01323cim a2200289u  4500</marc:leader>
          <marc:controlfield tag="005">20020430144848.0</marc:controlfield>
          <marc:controlfield tag="008">860714 19601969quc                      </marc:controlfield>
          <marc:datafield tag="100" ind1=" " ind2=" ">
              <marc:subfield code="a">Alcock, J.</marc:subfield>
          </marc:datafield>
          <marc:datafield tag="245" ind1=" " ind2=" ">
              <marc:subfield code="a">Animal behavior:  An evolutionary approach</marc:subfield>
          </marc:datafield>
          <marc:datafield tag="250" ind1=" " ind2=" ">
              <marc:subfield code="a">3rd</marc:subfield>
          </marc:datafield>
          <marc:datafield tag="260" ind1=" " ind2=" ">
              <marc:subfield code="a">Sinauer Associates</marc:subfield>
              <marc:subfield code="b">Sunderland, MA</marc:subfield>
              <marc:subfield code="c">1984</marc:subfield>
          </marc:datafield>
          <marc:datafield tag="650" ind1=" " ind2=" ">
              <marc:subfield code="a">Psychology</marc:subfield>
          </marc:datafield>
          <marc:datafield tag="700" ind1=" " ind2=" ">
              <marc:subfield code="l">eng</marc:subfield>
          </marc:datafield>
      </marc:record>

      3) It's then just a matter of running MarcEdit's MarcMaker tool on this output and generating a list of records that are then input for the upload tool in the catalog.

       


Anonymous


Cancel   Add attachments