Subject | Re: [ib-support] Re: Is this a firebird bug ? |
---|---|
Author | Carlos H. Cantu |
Post date | 2003-03-14T20:01:15Z |
The result of DATE operations (-) is number of days in the interval, I
do it all the time, with dialect 3.
[]s
Carlos
WarmBoot Informatica - http://www.warmboot.com.br
FireBase - http://www.FireBase.com.br (Firebird/Interbase HQ)
AVN> --- In ib-support@yahoogroups.com, "Carlos H. Cantu" <warmbooter@w...>
AVN> wrote:
AVN> dialect 1 ;)), but in dialect 3 you can't perform arithmetic
AVN> operations when both operands are dates. In dialect 1 you can, result
AVN> is interpreted as double, but in 3, where Date is based on integer -
AVN> not. Sense of result of such operation is time interval, not a date,
AVN> and in FB there is not such datatype (Oracle have this). Why was made
AVN> decision not to interprete this result as integer, I don't know. BTW,
AVN> even in dialect 1 you can't make Date1+Date2 (and that is
AVN> understandable - what is the sence of result?), only Date1-Date2. So,
AVN> if you'll proceed discussion in firebird-devel, you can ask directly
AVN> why they don't want to interprete time interval accordingly basic
AVN> datatype.
AVN> Best regards, Alexander V.Nevsky.
AVN> To unsubscribe from this group, send an email to:
AVN> ib-support-unsubscribe@egroups.com
AVN> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
do it all the time, with dialect 3.
[]s
Carlos
WarmBoot Informatica - http://www.warmboot.com.br
FireBase - http://www.FireBase.com.br (Firebird/Interbase HQ)
AVN> --- In ib-support@yahoogroups.com, "Carlos H. Cantu" <warmbooter@w...>
AVN> wrote:
>> One more info :AVN> Carlos, can't surely say is it bug or feature (you know, I use
>>
>> If I replace
>>
>> where (p.brinco = :Brinco) and ((p.data - :dNasc) <= 20)
>>
>> with the equivalent
>>
>> where (p.brinco = :Brinco) and (p.data <= (:dNasc+20))
>>
>> it does not raise the error, so I think this is really a FB bug.
AVN> dialect 1 ;)), but in dialect 3 you can't perform arithmetic
AVN> operations when both operands are dates. In dialect 1 you can, result
AVN> is interpreted as double, but in 3, where Date is based on integer -
AVN> not. Sense of result of such operation is time interval, not a date,
AVN> and in FB there is not such datatype (Oracle have this). Why was made
AVN> decision not to interprete this result as integer, I don't know. BTW,
AVN> even in dialect 1 you can't make Date1+Date2 (and that is
AVN> understandable - what is the sence of result?), only Date1-Date2. So,
AVN> if you'll proceed discussion in firebird-devel, you can ask directly
AVN> why they don't want to interprete time interval accordingly basic
AVN> datatype.
AVN> Best regards, Alexander V.Nevsky.
AVN> To unsubscribe from this group, send an email to:
AVN> ib-support-unsubscribe@egroups.com
AVN> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/