[Babase] Re: YIKES...what IS this?
kfenn
kfenn at princeton.edu
Tue Sep 16 08:14:39 EDT 2008
Thanks very much for checking on that, Karl. I wanted to send that off
before I left because if the problem happened to be something more
significant than a mis-typed dcpid, I didn't want to wait until Tues to
find out.
I should finish th uplaod and rebuilds this morning and I'll notify the
list when 08a is done.
Tabby
Karl O. Pinc wrote:
>
> On 09/11/2008 03:18:48 PM, kfenn wrote:
>
>> I'm uploading to PREGS in babase. I uploaded a similar pregs file
>> (similar to the one attached) to babase_test with no problem but I
>> got this error message in babase. I say the file was similar because
>> every time I enter the pregs I have to go back to the database and
>> get the new dcpid's created from the most recent cycles upload (so
>> the error could be in my dcpid input...although I've never seen a
>> message like this one before). ECH is not in the pregs file I'm
>> trying to upload and as far as I can tell she had ECH8, then a normal
>> resume file in June 08. It's possible I pulled her dcpid and tried
>> to give another female her conceptive cycle, but I did a quick search
>> and find and i didn't see her dcpid for June.
>>
>
>>
>> ERROR: ECH8: 9: Parity out of sequence: Mismatch with preceeding
>> pregnancy
> <snip>
>
> Your exactly right as to the problem. CYCLES.Cpid 54773
> belongs to ECH, not OXY.
>
> I found this with a query that looks like:
> select sname, cpid from cycpoints, cycles where cycpoints.cid =
> cycles.cid and sname = 'ECH' and (cpid = '54437' or cpid = ...);
>
> Rather than insert directly into the table you may find it
> better to do a bit of text manipulation ahead of time
> (search and replace on a table like the one you
> attached, or do a macro, or even cut and paste)
> and write a little sql script that'd look like:
>
> begin;
>
> insert into pregs (pid, parity, conceive)
> select 'MBE3', 3, conceive.cpid
> from cycpoints_cycles as conceive
> where conceive.sname = 'MBE'
> and conceive.date =
> (select max(date)
> from cycpoints_cycles
> where cycpoints_cycles.sname
> = conceive.sname
> and date < 'whateverbirthdate');
>
> insert into pregs (pid, parity, conceive)
> select 'NOO2', 2, conceive.cpid
> from cycpoints_cycles as conceive
> where conceive.sname = 'NOO'
> and conceive.date =
> (select max(date)
> from cycpoints_cycles
> where cycpoints_cycles.sname
> = conceive.sname
> and date < 'whateverbirthdate');
> ...
> commit;
>
> You substitute in the pid, parity, sname,
> and birthdate of the offspring. Assuming CYCLES
> is right it finds the Zdate for you. (Don't
> forget the begin and commit so the update is all or
> nothing.)
>
>
> Karl <kop at meme.com>
> Free Software: "You don't pay back, you pay forward."
> -- Robert A. Heinlein
>
> _______________________________________________
> Babase mailing list
> Babase at www.eco.princeton.edu
> http://www.eco.princeton.edu/mailman/listinfo/babase
--
Tabby Fenn
Research Assistant
Dept of Ecology and Evolutionary Biology
401 Guyot Hall
Princeton University
Princeton, NJ 08544
609 258-6898 (Ph)
609 258-2712 (Fx)
More information about the Babase
mailing list