In other databases, you can usually preface the field name with a "." for the database name, but I don't think FileMaker directly supports this capability without a little set up.
From the link I found below after searching for about 10 seconds, I would try adding the other database tables to the Relationship graph first using an ODBC driver for the other database or FileMaker tables for another FileMaker database.
Please post back with your progress.
the tables (table occurrences - TOs) must be on the RG (relationship graph) of the file where the ExecuteSQL is called. If you have a relationship between the two, then they are both on the RG.
So, yes, you can create a query.
Is there reason to make a query rather than display in a portal on the layout?
morkus, if you mean using ".column" instead of "table.column", then not in ExecuteSQL. However, the table name (or TO - table occurrence) does not even need to be used if the fields/columns are unique within the query. Only if there may be confusion (in a JOIN, for example) as to which field/column is being referenced, then the table (or its alias) is prepended to the field/column name.
I think FM would think '.column' is a field name and give an error to the query.
Excellent link, BTW!
With the ".", I was just saying how you could possibly reference multiple databases in a single query, not FileMaker.
For FileMaker, if you re-read my posting, I suggested having the tables all in the same Relationship graph using ODBC or possibly native FMP tables.
yes, all must be in the same graph for a lot of FM (internally and externally)! Layouts, for example are used in web publishing (XML) and layouts are based on tables (table occurrences on the graph).
not sure I understood, but if your concern is that there is no table occurrence of file B on file A relationship graph, then indeed the native ExecuteSQL function is not able to talk to the other file (no 'file' parameter)
… which is quite a surprising choice I think, since the fql api has been allowing it for a long time. Using plugins such as DoSQL or BaseElements, you can perfectly do this. Remember that at least one window of the target file has to be open (even if hidden)