I don't think TODAY is supported in SQL. You could use a QBE or create the SQL on the fly (untested):
var
mySQL SQL
currentDate date
dbTables database
endVar
dbTables.open(":WORK:"
;maybe my setup but SQL always seems to want date format as MM/DD/YYYY
currentDate = = "'" + format("DY3,DO(%M/%D/%Y)", today() + "'"
mySQL = SQL
SELECT COUNT( Clients."CardNo" )
FROM "Clients.DB" Clients
WHERE
(Clients."ConExpiry" >= ~currentDate)
endSQL
if not mySQL.executeSQL(dbTables, "RIV:ANSWER.DB" then
errorShow()
return
endif
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.