Is it possible to use variables in SQL queries?
In my example below, If I replace $$P1End with a date wrapped in single quotes such as '9/20/2015', I get an accurate result. If I set a variable $$P1End with a date, the query returns ?
ExecuteSQL ("SELECT COUNT (OrgID)
WHERE \"Date Ordered\" < $$P1End AND Status = 'Client' ";"";"")
Are variables not allowed in SQL queries or is my syntax incorrect?