Re: Field math advice

Daniel O'Donnell <[email protected]>
Newsgroups gmane.text.refdb.general
Organization University of Lethbridge
Message-ID <[email protected]>
Thanks Damien,

I'm using mysql, but I'll take this as a starting point and see what I
can do.

-d

On Sun, 2006-25-06 at 19:59 +0100, Damien Jade Duff wrote:
> Gidday Daniel
> 
> This may be a bit hacky, it's something I wrote when I first started, 
> working around my own lack of knowledge. It's the script I used once to 
> get arbitrary sql queries out of REFDB using postgresql. I've changed it 
> so that the sql command is close to the one that you'd want. Also you 
> have to enter your database name and you may have to add username and 
> password details if they're not already set up in config files etc. and 
> to use the database client you're using.
> 
> Peace
> Damien
> 
> echo -- start script --
> 
> rm -f out.111
> 
> rm -f out.222
> 
> rm -f out.333
> 
> psql DBNAME -t -c "select refdb_citekey from t_refdb where 
> to_number(refdb_startpage,"9999999999") > 
> to_number(refdb_endpage,"9999999999");">out.111
> 
> cat out.111 | echo :ID:\>9999 `sed -e 's/ / OR :CK:=/g'` > out.222
> 
> refdbc -d djdphd -C getref -t ris `cat out.222` > out.333
> 
> cat out.333
> 
> echo -- end script --
> 
> Daniel O'Donnell wrote:
> > Hi all,
> > 
> > A question:
> > 
> > In adding legacy data to my refdb database, I have inconsistencies in
> > the way end page numbers are represented: they can show up in any of the
> > following formats:
> > 
> > a) 323-324
> > b) 323-24
> > c) 323-4
> > 
> > I think I'd prefer (a), because the others can all be derived from it.
> > What I'd been thinking of doing was trying to extract the records that
> > are in the form (b) or (c) and then manually correct them (if somebody
> > has a better idea, I'd love to hear it).
> > 
> > To find the ones I wanted, I thought I'd use something like this:
> > 
> > refdbc: getref :EP:<:SP:
> > 
> > But this clearly isn't doing what I'm expecting, as here are my first
> > three results (of hundreds); ideally of these three, only the first
> > should show up; the second one in the list actually has an EP that is
> > larger than SP, though it isn't showing up in the output:
> > 
> > ID*:1 (1992)
> > Key: ABRAHAM1992
> > Abraham,Lenore
> > Cædmon's Hymn and the Geþwærnysse (fitness) of things
> > American Benedictine Review 43:331-44
> > 
> > ID*:5 (1998)
> > Key: SZARMACH1998
> > Szarmach,Paul E.
> > Anthem: Auden's Caedmon's Hymn
> > 
> > in: Utz,Richard J., Shippey,T.A., Workman,Leslie J., University of
> > Sydney, Centre for Medieval Studies(ed.), Medievalism in the modern
> > world essays in honour of Leslie J. Workman; part of: Making the Middle
> > Ages
> > Series Volume: v. 1pp. 329-340
> > 
> > 
> > Any suggestions?
> > 
> > -d
> > 
-- 
Daniel Paul O'Donnell
Associate Professor and Chair of English
Director, Digital Medievalist Project
<http://www.digitalmedievalist.org/>
University of Lethbridge
Lethbridge AB T1K 3M4
Canada

Vox +1 403 329-2377
Fax +1 403 382-7191

:@caedmon/ubuntu


Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Refdb-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/refdb-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.