I thought ExecuteSQL was not related to the current context (table occurence or record). That was the whole point of it.
Thanks for clearing that up for me
The short answer is NO. The reason is because the executeSQL does not work with the relationship graph or the current record set meaning you have to define everything you want in SQL. You could accomplish the desired result with a a statement like the one below.
"SELECT COUNT(id) FROM products WHERE recordNum>0 AND recordNum<21"
If you are working with a record set why dont you just use the get(FoundCount) function?
Would this give the desired results??
"SELECT id FROM products HAVING recordNum < 21"
The word TABLE in your query seems unnecessary. Message was edited by: timwhisenant
Kevin ay be an insider,
When using the ExecuteSQL statement you should forget about the FMI Relationship Graph, User Interface, and Layout context.
The SQL statement must be totally self contained including the "Find" (Where) criteria used to get the 'Found Set'. This is because the ExecuteSQL works from outside looking into the Tables of the File.
There have been several discussions and a couple of Tutorials written by FMP developers. I suggest searching for the ExecuteSQL command and tracking them down.