So what is the verdict. Am I uploading the numbers into a character field? :) Thanks<div>Lacey<br><br><div class="gmail_quote">On Thu, Jul 22, 2010 at 3:15 PM, Karl O. Pinc <span dir="ltr"><<a href="mailto:kop@meme.com">kop@meme.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class="im">On 07/22/2010 01:52:51 PM, Jeanne Altmann wrote:<br>
</div><div class="im">> Although it would work in this instance, particularly as zero is not<br>
> one<br>
> of the codes we're using here, unless I'm missing something it feels<br>
> cleaner to have it as integer if that's easy.<br>
<br>
</div><div class="im">It is easy, but you should not be able to tell the difference either<br>
way. (Except that one way you would be precluded from ever using<br>
letters as codes.)<br>
<br>
Because it really does not matter I'm not sure why the issue was<br>
even brought up.<br>
<br>
</div><div><div></div><div class="h5">> jeanne<br>
><br>
> -----Original Message-----<br>
> From: <a href="mailto:babase-bounces@eeblistserv.princeton.edu">babase-bounces@eeblistserv.princeton.edu</a><br>
> [mailto:<a href="mailto:babase-bounces@eeblistserv.princeton.edu">babase-bounces@eeblistserv.princeton.edu</a>] On Behalf Of Karl<br>
> O.<br>
> Pinc<br>
> Sent: Thursday, July 22, 2010 11:58 AM<br>
> To: The Baboon Database Project<br>
> Subject: Re: [Babase] lymphstates<br>
><br>
> On 07/22/2010 10:20:00 AM, Susan Alberts wrote:<br>
> > Thanks Karl,Are you saying that if it is designated as a character<br>
> > but<br>
> ><br>
> > we query it as if it was numeric we will not get an error?<br>
><br>
> That's right. The db will automatically convert between the<br>
> 2 datatypes; when it sees an integer being compared with<br>
> a character it converts the integer to characters and then<br>
> does the comparison.<br>
><br>
><br>
> In that<br>
> > case I have no problem with it. I just wasn't sure what you meant<br>
> by<br>
><br>
> > that database will automatically convert.<br>
> > Susan<br>
> > On Jul 21, 2010, at 4:46 PM, Karl O. Pinc wrote:<br>
> ><br>
> > > You know what? This change does not make any sense.<br>
> > > The database will automatically convert '1' into<br>
> > > 1, and vice versa, as needed.<br>
> > ><br>
> > > On 07/21/2010 11:21:07 AM, Karl O. Pinc wrote:<br>
> > >> On 07/21/2010 08:32:56 AM, Susan Alberts wrote:<br>
> > >>> My only comment on this is that if the column is numeric but<br>
> > coded<br>
> > >> as<br>
> > >>><br>
> > >>> a character it can be very confusing to query because it won't<br>
> be<br>
> > >>> natural or obvious that you need to query as a character, so I<br>
> at<br>
> > >> any<br>
> > >>><br>
> > >>> rate would often end up writing a query with this statement<br>
> > >>><br>
> > >>> Select * from lymphstates<br>
> > >>> where state = 1<br>
> > >>><br>
> > >>> Instead of<br>
> > >>><br>
> > >>> where state = '1'<br>
> > >><br>
> > >>> For<br>
> > >>><br>
> > >>> this reason, if it's numeric it should be coded as numeric<br>
> and<br>
> > if<br>
> > >><br>
> > >>> it's a character it would be better to have it as a letter.<br>
> Does<br>
> > >> this<br>
> > >>><br>
> > >>> make sense? I'm okay with either.<br>
> > >><br>
> > >> Ok. Makes sense. I'll make it numeric.<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><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><br>
> ><br>
> > --------------------------------------------------------<br>
> > Susan Alberts, Dept of Biology, Duke University, Box 90338, Durham<br>
> NC<br>
> ><br>
> > 27708, 919-660-7272 (Ph), 919-660-7293 (Fax)<br>
> ><br>
> ><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><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><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><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><br>
</div></div></blockquote></div><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><br>
</div>