Hi, Dev Group! I've made some great progress, albeit in a round-about way. For whatever reason, I could not get the .sql file to work properly. I ended up having to copy/paste in a few waves my Marc records into the marcxml_import table using webmin. Not ideal, but I now have all the records in my database.
I'm having trouble inserting it into the biblio.record_entry table, now. I'm taking the line right out of the sample script you gave, but it's having the following effect: evergreen=# evergreen=# INSERT INTO biblio.record_entry (marc, last_xact_id) SELECT marc, 'IMPORT' FROM marcxml_import; ERROR: Unable to provide required features CONTEXT: PL/Perl function "maintain_control_numbers" evergreen=# I found that there was mention in the changelog from 1.6.1.0 to 2.0.0 to the global flag 'cat.maintain_control_numbers', but I can't tell if I'm supposed to enable/disable it on my installation, or what. What do I need to do to insert my records from the one table to the next? Thanks again!! Elliot J Voris -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Elliot Voris Sent: Wednesday, December 14, 2011 01:22 PM To: Evergreen Development Discussion List Subject: Re: [OPEN-ILS-DEV] MARC Record Import from txt Sure thing! Here is the complete script, with just a small sample of the actual MARC records. Your script added a copy to Evergreen's holdings, but my library asked me to omit that functionality. Thanks again for your huge help! Elliot J Voris -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Dan Scott Sent: Wednesday, December 14, 2011 12:27 PM To: Evergreen Development Discussion List Subject: Re: [OPEN-ILS-DEV] MARC Record Import from txt On Wed, Dec 14, 2011 at 1:18 PM, Elliot Voris <[email protected]> wrote: > Hi, Dan > > Thanks again for your help! I'm still having no luck. As a test measure, I > removed any single-quotes (') from the MARC records before enclosing them in > the format that your script was in: ('<MARC>'), so I'm sure my issue is > something else. > > I'm wondering if PostgreSQL doesn't like the way I put the parenthesis and > single-quotes to begin with. The only method I could figure out to put the > necessary characters in place was using Notepad++. I did a find/replace with > the regular expressions as follows: > > To place the "('" at the beginning, I found the regular expression > "^(.*)$" (no quotes), and replaced with the regex "('\1" (again, no > quotes) To place the "')," at the end, I found the regular expression > "^(.*)$" (no quotes), and replaced with the regex "\1')," (again, no > quotes) > > Could that have messed up encoding or something? Is there a better way to add > the necessary parenthesis & single-quotes at the beginning/end of each line? Elliot: It might be easiest to debug if you could attach a small sample of your import script - say, 10 lines - so that we can see what it actually looks like. Dan
