<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.5pt;
        font-family:Consolas;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:Consolas;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoPlainText>Billy will soon be Amok in babase.&nbsp; All the steps
together:<o:p></o:p></p>

<p class=MsoPlainText><o:p>&nbsp;</o:p></p>

<p class=MsoPlainText>Empty members (as admin &#8211; do the rest as database
manager) <o:p></o:p></p>

<p class=MsoPlainText>update biograph set pid = 'BET5', birth = '1995-02-28',
bstatus = 0, matgrp = 3.00 where sname = 'AMO'; <o:p></o:p></p>

<p class=MsoPlainText>Upload census files using upcen&nbsp; (I had two files -
one for Amok in Lodge group through Dec 1995 and then one for Amok in Joy's
group in 1996-7) <o:p></o:p></p>

<p class=MsoPlainText>select rebuild_all_members();&nbsp; (needed to do this
for the next step, otherwise it threw errors) <o:p></o:p></p>

<p class=MsoPlainText>update census set status = 'M', cen = 'f' where sname =
'AMO' and date = '1995-12-31';<o:p></o:p></p>

<p class=MsoPlainText>update census set status = 'M', cen = 'f' where sname =
'AMO' and date = '1996-01-01';<o:p></o:p></p>

<pre><span style='font-size:9.0pt'>UPDATE RANKS SET SNAME = 'AMO' WHERE SNAME ='BIL';<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt'>UPDATE PARTS SET SNAME = 'AMO' WHERE SNAME ='BIL';<o:p></o:p></span></pre>

<p class=MsoPlainText>delete from census where sname = 'BIL';<o:p></o:p></p>

<p class=MsoPlainText>delete from biograph where sname = 'BIL';<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Note the modification I made to the update census lines &#8211;
forgot to fix that in my file &#8211; cen has to be false for status to be M.<o:p></o:p></span></p>

<p class=MsoPlainText>(Aside: &nbsp;Is emptying members necessary?&nbsp; I&#8217;m
thinking moving AMO&#8217;s birthdate forward in time would make members mad if
it weren&#8217;t empty, yes?)<o:p></o:p></p>

<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p>&nbsp;</o:p></span></p>

<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>

<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
babase-bounces@eeblistserv.Princeton.EDU
[mailto:babase-bounces@eeblistserv.Princeton.EDU] <b>On Behalf Of </b>Lacey Maryott
Roerish<br>
<b>Sent:</b> Wednesday, May 05, 2010 4:55 PM<br>
<b>To:</b> The Baboon Database Project<br>
<b>Subject:</b> Re: [Babase] Re: manual census entries<o:p></o:p></span></p>

</div>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<p class=MsoNormal>MY UPDATE STATEMENTS ARE&nbsp;<o:p></o:p></p>

<div><pre><span style='font-size:9.0pt'>UPDATE RANKS SET SNAME = 'AMO' WHERE SNAME ='BIL';<o:p></o:p></span></pre><pre><span
style='font-size:9.0pt'>UPDATE PARTS SET SNAME = 'AMO' WHERE SNAME ='BIL';<o:p></o:p></span></pre>

<p class=MsoNormal><o:p>&nbsp;</o:p></p>

<div>

<p class=MsoNormal>On Wed, May 5, 2010 at 4:49 PM, Karl O. Pinc &lt;<a
href="mailto:kop@meme.com">kop@meme.com</a>&gt; wrote:<o:p></o:p></p>

<p class=MsoNormal>On 05/05/2010 03:39:44 PM, Niki Learn wrote:<br>
&gt; Yes, you have to be babase_admin to empty members. &nbsp;I do it every<br>
&gt; update.<br>
&gt; Actually I didn't even try NOT emptying members - I just assumed it<br>
&gt; would be<br>
&gt; necessary since we were messing with census data. &nbsp;But then it threw<br>
&gt; errors<br>
&gt; when I tried to change the census entries to manual because the<br>
&gt; latter<br>
&gt; part<br>
&gt; of Amok's life had not been rebuilt yet in members so it didn't like<br>
&gt; him<br>
&gt; having ranks and stuff when he wasn't listed as being in the group.<br>
&gt; Do you<br>
&gt; think we could have skipped the members part.<br>
&gt;<br>
&gt; We can't delete Billy's census data until the end, after all his<br>
&gt; ranks<br>
&gt; and<br>
&gt; parts data has been switched over to Amok. &nbsp;We can't switch that over<br>
&gt; until<br>
&gt; Amok is in census. &nbsp;It is a circle.<br>
<br>
There's no restriction on having Amok and Billy be censused in<br>
the same group. &nbsp;So I'd expect you'd add Amok's census entries<br>
first, then move all the data by deleting stuff from Billy<br>
and adding it to Amok, then delete Billy's census entries<br>
last.<br>
<br>
The basic principle would be to delete in an order that's<br>
opposite from the order in which you add.<br>
<br>
&nbsp;I guess if there is a way to do<br>
&gt; all<br>
&gt; three simultaneously then we wouldn't need as many steps. &nbsp;But I got<br>
&gt; rid of<br>
&gt; most of the manual census entries anyway so whatever. &nbsp;This worked so<br>
&gt; we are<br>
&gt; happy.<br>
<br>
Yes. &nbsp;You don't care so much about deleting Billy's members because<br>
you know he's going away so you don't care about errors. &nbsp;It's<br>
just a little spooky having to be babase_admin. &nbsp;Sort of like<br>
resorting to a hammer. &nbsp;Nothing wrong with a hammer though,<br>
it's a fine tool. &nbsp;:-)<o:p></o:p></p>

<div>

<p class=MsoNormal><br>
&gt;<br>
&gt; -----Original Message-----<br>
&gt; From: Karl O. Pinc [mailto:<a href="mailto:kop@meme.com">kop@meme.com</a>]<br>
&gt; Sent: Wednesday, May 05, 2010 4:26 PM<br>
&gt; To: Niki Learn<br>
&gt; Subject: Re: manual census entries<br>
&gt;<o:p></o:p></p>

</div>

<div>

<p class=MsoNormal>&gt; On 05/05/2010 03:20:10 PM, Niki Learn wrote:<br>
&gt; &gt; I guess we should make sure each office has a full list of the<br>
&gt; steps<br>
&gt; &gt; in case<br>
&gt; &gt; we ever have to do this again. &nbsp;Most of them aren't in here
though.<br>
&gt; &gt; Shall<br>
&gt; &gt; we compile a list of the steps and send that to the list for<br>
&gt; &gt; archiving?<br>
&gt; &gt; Here's what I have:<br>
&gt; &gt;<br>
&gt; &gt; Empty members<br>
&gt;<o:p></o:p></p>

</div>

<p class=MsoNormal>&gt; Wouldn't you have to be babase_admin to do this?<br>
&gt;<br>
&gt; As an alternative why not delete all the<br>
&gt; census rows?<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; Karl &lt;<a href="mailto:kop@meme.com">kop@meme.com</a>&gt;<br>
&gt; Free Software: &nbsp;&quot;You don't pay back, you pay forward.&quot;<br>
&gt; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-- Robert A.
Heinlein<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
<br>
<br>
<br>
Karl &lt;<a href="mailto:kop@meme.com">kop@meme.com</a>&gt;<br>
Free Software: &nbsp;&quot;You don't pay back, you pay forward.&quot;<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; -- Robert A. Heinlein<br>
<br>
<br>
_______________________________________________<br>
Babase mailing list<br>
<a href="mailto:Babase@www.eco.princeton.edu">Babase@www.eco.princeton.edu</a><br>
<a href="http://www.eco.princeton.edu/mailman/listinfo/babase" target="_blank">http://www.eco.princeton.edu/mailman/listinfo/babase</a><o:p></o:p></p>

</div>

<p class=MsoNormal><br>
<br clear=all>
<br>
-- <br>
- -<br>
Lacey K. Maryott Roerish<br>
Alberts Lab<br>
Department of Biology<br>
Duke University<br>
ph: 919-660-7306<br>
fax: 919-660-7293<br>
<a href="mailto:Lacey.Maryott@duke.edu">Lacey.Maryott@duke.edu</a><o:p></o:p></p>

</div>

</div>

</body>

</html>