Subject | Re: [ib-support] string concatination, triggers |
---|---|
Author | Nando Dessena |
Post date | 2001-04-09T15:13:56Z |
Lucas,
confirm) that 100 + null evaluates to false.
select fieldx + 100 as field_sum
from mytable
where mytable has one record only and there fieldx is null.
Ciao
--
____
_/\/ando
> > If I issueAs I see we two agree; I just wanted to know why did Helen say (and
> >
> > select 100 + cast(NULL as integer) from rdb$database
> >
> > I get NULL as a result.
> > Ciao
>
> Which is in fact the correct result since CAST ( NULL AS INTEGER ) will
> result in NULL anyway, and thus 100 + NULL will be NULL, too.
confirm) that 100 + null evaluates to false.
> I think you're mixing up something.I think you haven't read the thread carefully enough. ;-)
> In Delphi you'll be able to treat a NULL field asInteger which mightthe cast in my example was just a syntactic aid; I could rewrite it:
> give you a value of 0.
> But this is implemented in the DBTools, the databse knows nothing about
> casting NULL fields as 0 (Integer, Float) or empty string (String).
> It's just NULL.
select fieldx + 100 as field_sum
from mytable
where mytable has one record only and there fieldx is null.
Ciao
--
____
_/\/ando