Home Forums SQL Server 2008 SQL Server Newbies Convert Excel formula to SQL RE: Convert Excel formula to SQL<!-- 864 -->

  • Actually I got it!!!

    I adjusted the SQLfiddle statement needed a couple extra brackets to complete the addition before dividing by 2:

    This now works!!!

    ((ABS((SELECT MAX(Wins ) FROM WinLossSum) - Wins )) +

    (ABS(Losses - (SELECT MIN(Losses) FROM WinLossSum)))) / 2.0 AS GamesBehind

    (6-4) + (2-0) / 2

    2+2/2=2

    You all are awesome!! Thanks so much for this!