[OPEN-ILS-DEV] MARC Record Import from txt
Elliot Voris
evoris at slcconline.edu
Wed Dec 14 14:21:49 EST 2011
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: open-ils-dev-bounces at list.georgialibraries.org [mailto:open-ils-dev-bounces at list.georgialibraries.org] 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 <evoris at slcconline.edu> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: MarcImporSample.sql
Type: application/octet-stream
Size: 51605 bytes
Desc: MarcImporSample.sql
URL: <http://libmail.georgialibraries.org/pipermail/open-ils-dev/attachments/20111214/69f6aef9/attachment-0001.obj>
More information about the Open-ils-dev
mailing list