Cast and convert

From: Stefan Tchigik (mamouth3_at_libertysurf.fr)
Date: 03/09/04


Date: Tue, 9 Mar 2004 15:43:52 +0100

Hello alls,

I have a conversion problem with DateTime,
Select Sum( Cast(Cycle_F1 as Float)
                   + Cast(Cycle_F2 as Float)
                   - Cast(Cycle_D2 as Float)
                   - Cast(Cycle_D1 as Float)
                   - Cast(Cycle_P1 as Float)
                   - Cast(Cycle_P2 as float)))
>From Cycle
Where
....

This statment do the sum of some DateTime fields...
But if ONE of thoses fields is null then the entire result is null.

I want that if any of thoses fields is null then those field should be added
has 0.... Anybody have an Idea ?

Thanks,



Relevant Pages

  • Re: Cast and convert
    ... Try this: IsNull(Cast(Cycle_F1 as Float), ... > This statment do the sum of some DateTime fields... ... > But if ONE of thoses fields is null then the entire result is null. ...
    (borland.public.delphi.database.ado)
  • Re: Cast and convert
    ... > This statment do the sum of some DateTime fields... ... > But if ONE of thoses fields is null then the entire result is null. ...
    (borland.public.delphi.database.ado)
  • Re: event update
    ... > (succession through their dateTime value). ... > On the other hand, if you just need the SUM up to the datetime, a running ... >>I have a feild that I want to be updated from another feild in a form, ... >> way the current count of the next week starts out with Diff added into it. ...
    (microsoft.public.access.forms)
  • Re: Hourly volume calculation
    ... I recommend starting with a table representing the 24 hour period. ... Fix this up for your table and column names (YourTable and DateTime). ... field consisting multiple volume entries. ... I need to sum up the volumes by ...
    (microsoft.public.access.queries)
  • Count uniques ?
    ... I have several transactions in several days like hmmm Tasks ... I sum them with the Task.sum ... ps: day is datetime ... ...
    (comp.lang.ruby)