ExecuteSQL & date ranges

Discussion created by DavidZakary on Jun 18, 2014
Latest reply on Jun 7, 2017 by fmpdude

ExecuteSQL newbie here.


Trying to get a count of records that occur between two dates.


The start and end dates reside in global fields in a different table from the data being queried.


The ExectuteSQL statement works fine without the date range. As soon as I put the range in it failes.


My ExecuteSQL statement is as follows:


SELECT count (*) FROM Usage2 WHERE Usage2::Usage_Date BETWEEN decay3::g_date_start AND decay3::g_date_end


Any pointers?