<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. All the steps
together:<o:p></o:p></p>
<p class=MsoPlainText><o:p> </o:p></p>
<p class=MsoPlainText>Empty members (as admin – 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 (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(); (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> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </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 –
forgot to fix that in my file – cen has to be false for status to be M.<o:p></o:p></span></p>
<p class=MsoPlainText>(Aside: Is emptying members necessary? I’m
thinking moving AMO’s birthdate forward in time would make members mad if
it weren’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> </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> </o:p></p>
<p class=MsoNormal>MY UPDATE STATEMENTS ARE <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> </o:p></p>
<div>
<p class=MsoNormal>On Wed, May 5, 2010 at 4:49 PM, Karl O. Pinc <<a
href="mailto:kop@meme.com">kop@meme.com</a>> wrote:<o:p></o:p></p>
<p class=MsoNormal>On 05/05/2010 03:39:44 PM, Niki Learn wrote:<br>
> Yes, you have to be babase_admin to empty members. I do it every<br>
> update.<br>
> Actually I didn't even try NOT emptying members - I just assumed it<br>
> would be<br>
> necessary since we were messing with census data. But then it threw<br>
> errors<br>
> when I tried to change the census entries to manual because the<br>
> latter<br>
> part<br>
> of Amok's life had not been rebuilt yet in members so it didn't like<br>
> him<br>
> having ranks and stuff when he wasn't listed as being in the group.<br>
> Do you<br>
> think we could have skipped the members part.<br>
><br>
> We can't delete Billy's census data until the end, after all his<br>
> ranks<br>
> and<br>
> parts data has been switched over to Amok. We can't switch that over<br>
> until<br>
> Amok is in census. It is a circle.<br>
<br>
There's no restriction on having Amok and Billy be censused in<br>
the same group. 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>
I guess if there is a way to do<br>
> all<br>
> three simultaneously then we wouldn't need as many steps. But I got<br>
> rid of<br>
> most of the manual census entries anyway so whatever. This worked so<br>
> we are<br>
> happy.<br>
<br>
Yes. 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. It's<br>
just a little spooky having to be babase_admin. Sort of like<br>
resorting to a hammer. Nothing wrong with a hammer though,<br>
it's a fine tool. :-)<o:p></o:p></p>
<div>
<p class=MsoNormal><br>
><br>
> -----Original Message-----<br>
> From: Karl O. Pinc [mailto:<a href="mailto:kop@meme.com">kop@meme.com</a>]<br>
> Sent: Wednesday, May 05, 2010 4:26 PM<br>
> To: Niki Learn<br>
> Subject: Re: manual census entries<br>
><o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>> On 05/05/2010 03:20:10 PM, Niki Learn wrote:<br>
> > I guess we should make sure each office has a full list of the<br>
> steps<br>
> > in case<br>
> > we ever have to do this again. Most of them aren't in here
though.<br>
> > Shall<br>
> > we compile a list of the steps and send that to the list for<br>
> > archiving?<br>
> > Here's what I have:<br>
> ><br>
> > Empty members<br>
><o:p></o:p></p>
</div>
<p class=MsoNormal>> Wouldn't you have to be babase_admin to do this?<br>
><br>
> As an alternative why not delete all the<br>
> census rows?<br>
><br>
><br>
><br>
><br>
> Karl <<a href="mailto:kop@meme.com">kop@meme.com</a>><br>
> Free Software: "You don't pay back, you pay forward."<br>
> -- Robert A.
Heinlein<br>
><br>
><br>
><br>
><br>
<br>
<br>
<br>
<br>
Karl <<a href="mailto:kop@meme.com">kop@meme.com</a>><br>
Free Software: "You don't pay back, you pay forward."<br>
-- 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>