[Babase] Interpolation coding done!

Karl O. Pinc babase@www.eco.princeton.edu
Sat, 15 Oct 2005 00:13:57 +0000


On 10/14/2005 03:20:06 PM, Catherine Markham wrote:

> The text says:
> 
> D (demography) The animal was noted, in the field notebooks or  
> elsewhere, to be in a group but was not marked present in a field  
> census on that day. There is an associated DEMOG row associated with  
> the CENSUS row. The individual may or may not have been marked  
> “absent” on the same group's field census for the day.[10]
> 
> [10] D usually occurs when a male is seen alone or in a non-census  
> group.
> 
> 
> I read this to say that a Demog Note will override an absence for an  
> animal in a particular group, but I didn't think this was possible in  
> practice.

<query snipped>

> Am I misreading the documentation or rusty on the rules for Demog  
> Notes?

A "D" can override a "A".  It's happened 3 times.
(See footnote 11.)  Try:

select * from census where status = 'D' and cen;

What would happen if you deleted the DEMOG row for any
of these 3 censues is that the "D" would automatically change back
to an "A".  (And then interpolation would adjust
members.)

For extra geek points try doing this on the new system.
(If you use the web interface you'll have to do the below all
in one big SQL submission!)
Start with a "BEGIN TRANSACTION;" and then
delete the DEMOG row (DELETE FROM demog
WHERE cenid = nnnnn;) and then do a SELECT
(or more than one) to look at the results
and then do a "ROLLBACK TRANSACTION;" to
put everything back the way it was.

(Though I don't know how well the installed
web interface deals with more than one select
in a SQL submission.)

Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                  -- Robert A. Heinlein