ExecuteSQL ( "SELECT * from DASHBOARD WHERE DASHBOARD::_task_frequency = ? UNION SELECT * from DASHBOARD WHERE DAYNAME(CURDATE) IN DASHBOARD::_task_frequency"
; "," ; ¶ ; "Daily" )
DataViewer in FMPA16 just displays "There is an error in the syntax of the query."
I'm wanting it to find me all rows (so that I can count them using count() in FM) from the DASHBOARD table where the task frequency is either daily or has the current date's dayname in it e.g. 'every Tuesday' for Tuesday or 'every Wednesday' for Wednesday. I can't simply count the rows of my portal in FM as I am using a cartesian join and then a portal filter.
Anyway since the portal filter specifies an 'or' condition, I think I can not make a direct relationship for it, as multi-predicate relationships in FM only use 'AND' conditions.
Now I am thinking that wrapping this ExecuteSQL statement in the FM count() function will not give a count anyway even if the syntax is correct. It's ok though, becasue then I can probably just use ValueCount() function on it instead :-) .
I hope you can help.