I just find one anwser on the help webpage: http://www.filemaker.com/12help/html/func_ref3.33.6.html#1062707,
the ExecuteSQL function is originated in FMP 12.0.
So, how can I use SQL query in FMP 11.0?
Keep on waiting for your help.
Hi Tony & welcome,
If you want to work with internal FM data then yes you'll need a plugin that is capable of executing SQL queries. The free BaseElements plugin will work just fine.
In 12 and 13 you can use the native ExcuteSQL function.
If you want to work with external data then you can use the "exeucte SQL" script step and "import from ODBC source" script step where you can specify SQL queries to INSERT/UPDATE and SELECT respectively.
Great answer from Wim! Remember that FMP12/13 and ExecuteSQL function only work to SELECT - (no INSERT, UPDATE or DELETE).
The plug-ins are the way to do this for FM11+ and get more of the "SQL" experience.
Thanks very much!
Thanks for your reminder.
However, is there any free plug-ins supporting those INSERT, UPDATE or DELETE for FMP 11?
Someone say that the Execute SQL can only interact with outside ODBC databases, not with the current Filemaker database. Is it ture?
As mentioned in my reply: the BaseElements plugin. Among many others.
The "Execute SQL" script step can only interact with outside ODBC sources. Note that this is a script step (and that the name has a space in it)
The "ExecuteSQL" function interacts with internal FM data (note: no space in its name; only available in FM12 and 13)
That is correct for the Script Step "Execute SQL" and not the function "ExecuteSQL()". ODBC DataSourceName must be set up for the Script Step to INSERT, UPDATE or DELETE (with authentication to the source, of course!)
The IMPORT script step may be used with the DSN to SELECT the same source.
I should update my filemaker asap.....
You can test scripting in FM11.
Set the file to share with ODBC, then able to do Script Execute SQL to itself.
(I saw in some environment forgotten version, that is tooo slow.)
Anyway if you update to FM13, not support full T-SQL...
Thanks for reply.
Up to now, I can find the Execute SQL in my script edit windows. But I haven't ever check its speed.
Could you give me some examples of SQL statement or structures which can't be supported even in FM13? Thanks again.
T-SQL is something extended by MicroSoft.
FM13 support is
SQL-92 entry-level conformance, with some SQL-92 intermediate features.
A simple example. FM13
SELECT SUM(some expression)...