


SQL for Beginnersįirst off, this is not going to be an extensive tutorial in using SQL with FileMaker.
NOTATIONAL VELOCITY DATA FILES HOW TO
Most notably, I want to explore how to use the script debugger and data viewer to assist in the debugging of your SQL queries. Improper quoting of elements in the queryįortunately for you, I have sacrificed some of my naturally colored hair and a few precious minutes off of my lifespan to bring you some useful tips for surviving the FileMaker/SQL learning curve.Using SQL syntax that is not accepted by the FileMaker SQL API (there are many versions of SQL).Using unacceptable characters (like an underscore ‘_’) as the first character of a field name.Using one of the 250-odd SQL reserved words as a table or field name.Here is a short list of syntax errors that will cause your SQL query to return a question mark and for you to lose a few minutes off of your projected lifespan: When you start writing SQL in FileMaker, you are stepping out of the safety of FileMaker’s tightly controlled programming environment that, for example, does not allow you to specify fields, scripts or other objects that don’t exist in the system. SQL queries must be syntactically perfect in order for them to work. This character is the lowly question mark (?), and is the only feedback provided by the FileMaker calculation engine when you write malformed SQL statements within the ExecuteSQL function.

And be prepared, as one simple punctuation character, innocent in all other contexts among our many human languages, may lead to premature aging. If you intend to embark on the rewarding path of integrating SQL into your FileMaker development, be warned. Well, now it’s time to come clean and tell you the truth about this powerful function and its hidden ability to turn your hair prematurely grey, cause you to lose sleep, or perhaps develop an annoying and embarrassing facial tick. Our loyal readers will know that we have published several articles extolling the virtues of the new ExecuteSQL function in FileMaker 12.
