[Babase] lymphstates

Jeanne Altmann altj at Princeton.EDU
Thu Jul 22 14:52:51 EDT 2010


Although it would work in this instance, particularly as zero is not one
of the codes we're using here, unless I'm missing something it feels
cleaner to have it as integer if that's easy.
jeanne

-----Original Message-----
From: babase-bounces at eeblistserv.princeton.edu
[mailto:babase-bounces at eeblistserv.princeton.edu] On Behalf Of Karl O.
Pinc
Sent: Thursday, July 22, 2010 11:58 AM
To: The Baboon Database Project
Subject: Re: [Babase] lymphstates

On 07/22/2010 10:20:00 AM, Susan Alberts wrote:
> Thanks Karl,Are you saying that if it is designated as a character 
> but
>  
> we query it as if it was numeric we will not get an error?

That's right.  The db will automatically convert between the
2 datatypes; when it sees an integer being compared with
a character it converts the integer to characters and then
does the comparison.


 In that  
> case I have no problem with it. I just wasn't sure what you meant by  
> that database will automatically convert.
> Susan
> On Jul 21, 2010, at 4:46 PM, Karl O. Pinc wrote:
> 
> > You know what?  This change does not make any sense.
> > The database will automatically convert '1' into
> > 1, and vice versa, as needed.
> >
> > On 07/21/2010 11:21:07 AM, Karl O. Pinc wrote:
> >> On 07/21/2010 08:32:56 AM, Susan Alberts wrote:
> >>> My only comment on this is that if the column is numeric but 
> coded
> >> as
> >>>
> >>> a character it can be very confusing to query because it won't be
> >>> natural or obvious that you need to query as a character, so I at
> >> any
> >>>
> >>> rate would often end up writing a query with this statement
> >>>
> >>> Select * from lymphstates
> >>> where state = 1
> >>>
> >>> Instead of
> >>>
> >>> where state = '1'
> >>
> >>> For
> >>>
> >>> this reason,  if it's numeric it should be coded as  numeric and
> if
> >>
> >>> it's a character it would be better to have it as a letter. Does
> >> this
> >>>
> >>> make sense?  I'm okay with either.
> >>
> >> Ok.  Makes sense.  I'll make it numeric.
> >>
> >>
> >> 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
> >>
> >>
> >
> >
> >
> >
> > 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
> 
> --------------------------------------------------------
> Susan Alberts, Dept of Biology, Duke University, Box 90338, Durham NC 
> 
> 27708, 919-660-7272 (Ph), 919-660-7293 (Fax)
> 
> 
> 
> 
> _______________________________________________
> Babase mailing list
> Babase at www.eco.princeton.edu
> http://www.eco.princeton.edu/mailman/listinfo/babase
> 
> 




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



More information about the Babase mailing list