Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)

  • RE: Divide two function columns

    Perfect - thank you.

    Your help is greatly appreciated.

  • RE: Divide two function columns

    Perfect thanks.

    One last bit, can I give an alias of 'MPG' to the calculation part?

    SUM(J.JourneyDistanceMiles) AS Mileage,

    SUM(J.JourneyTotalFuelUsed)*0.219969157 AS Fuel,

    SUM(J.JourneyDistanceMiles) / NULLIF((SUM(J.JourneyTotalFuelUsed)*0.219969157),0) AS [SUM(J.JourneyDistanceMiles)/SUM(J.JourneyTotalFuelUsed)*0.219969157 AS MPG]

  • RE: Divide two function columns

    This gives me a divide by zero error? (in reply to Eirikur Eiriksson)

    I assume i need to remove the bits in brackets so my statement reads:-

    SUM(J.JourneyDistanceMiles) AS Mileage,

    SUM(J.JourneyTotalFuelUsed)*0.219969157 AS Fuel,

    SUM(J.JourneyDistanceMiles)...

Viewing 3 posts - 1 through 3 (of 3 total)