You can use YesNoFormat to force-boolean and empty string to false.

> > If you are using CF, remember that NULL is returned as a zero length
> stri
> > ng
> > ( ' ') which is not the same as NULL.  If you have code that evaluates
> or
> > calculates in CF using that column, you either must default to a
> numeric
> > value or validate the numericity (is that a word) in the application
> code.
> > For this reason I usually default to 0 rather than NULL.  When you do
> thi
> > s,
> > you have the added benifit in CF of being able to use the value as if
> it
> > were a boolean, as in:
> >
> > <Cfif myquery.myIntergerColumn>
> > If the column is NOT 0, this executes
> >
> > <cfelseif NOT myquery.myIntegerColumn>
> > If the column IS 0, this executes
> >
> > </cfif>
> >
> > I find that useful in certain situations.
> >
> > Mark
> >
> > -----Original Message-----
> > From: Rice, John J [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, January 31, 2002 7:34 AM
> > To: CF-Talk
> > Subject: NULL or 0
> >
> >
> > For an Integer or Number field, does it make more sense to default
> values
> >  to
> > NULL or 0?
> >
> > When used for calculations, a column with NULL could cause a problem
> (eg.
> > NULL * 2).
> > Columns with NULL will be ignored in and SQL count, but columns with a
> 0
> > will be counted.
> >
> > Is this right?  Are there other reasons to favor one use or the other?
> >
> > "NULL programmers are easy to find and once found can be fired since
> they
> > are not needed."
> >
> >
> 
______________________________________________________________________
Dedicated Windows 2000 Server
  PIII 800 / 256 MB RAM / 40 GB HD / 20 GB MO/XFER
  Instant Activation · $99/Month · Free Setup
  http://www.pennyhost.com/redirect.cfm?adcode=coldfusiona
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists


Reply via email to