AnsweredAssumed Answered

ExecuteSQL not working

Question asked by jjfcpa on Apr 11, 2018
Latest reply on Apr 12, 2018 by philmodjunk

Can someone tell me what's wrong with this SQL.  It's supposed to just sum the par 3 holes for the April of the prior year.  Instead, it's still summing all the rounds of golf for the entire year and not limiting it to just the month of April.

 

ExecuteSQL ( "Select Sum( RoundsOfGolf.Par3Holes ) FROM RoundsOfgolf WHERE " & GetAsText ( Year( RoundsOfGolf::Date ) ) & " = " & GetAsText ( Year ( Get ( CurrentDate ) ) -1 ) & " AND " & GetAsText ( Month ( RoundsOfGolf::Date ) ) & " = 4";""; ""; "")

Outcomes