My ExecuteSQL links
I find it interesting that so many different things show many different ways to use ExecuteSQL in FileMaker, but people don't talk as much about the formatting of SQL in FM. At least as far as I have looked.
In any case, I format my ExecuteSQL like this:
FROM \"Tasks\" tableA
WHERE tableA.\"_kp_task_id\" = ?"
; "" ; ""; $task_id )
Although the formatting isn't limited to that structure. (Ex. SQL doesn't care much about whitespace, but I do. Escaped quotes aren't always needed. Capitalization of SQL commands, not needed.)
While you don't have to quote every name in SQL, it's not a bad idea. Field names that start with an underscore such as _kp... must be enclosed in double quotes or you get a syntax error.