Here is a really neat FileMaker SQL Script Tool and demo file from Tim Dietrich...Have you ever performed a find in FileMaker and wondered what an equivalent SELECT statement would look like? Or maybe had the need to write a SELECT statement (for use with ExecuteSQL), and you knew how to perform the find, but weren't sure how to translate it into SQL?
To help with this, I've put together a script called "SELECT Builder." To use it, you simply add it to your database, perform a find, and run the script. When the script completes, it will display a SELECT statement that is equivalent to the find that you performed. It also puts the SELECT statement into a global variable, so that you can grab the SQL and use it in an ExecuteSQL call.
Here's a link to a very simple database that includes the SELECT Builder script:
I've included 500 sample records to help you experiment with it. (Don't worry, they're fake.)
To experiment with the script, open the database, perform a find as you normally would, and then run the script. If you want to use the script in your own database, copy it from the demo database. The script uses variables only (no fields), so it should work without needing to make any modifications to it. Be sure to read the script header comment, which includes notes and a few "gotchas" that you should be aware of.
I hope you find the script to be useful. Let me know what you think.
- FileMaker Deployment, Security and SQL Webinar
- FMT Recommended MySQL - PHP Tutorial - Learn MySQL Query Language
- FileMaker Related Field Updater - Storing Unstored Fields
- Doing a mass export of all data, using FileMaker’s native ExecuteSQL function
- SQL Explorer - Learn FileMaker SQL – Write Queries Faster
Latest from Keefer Rogers
- FileMaker integration with Zendesk by Goya's Salvatore Colangelo
- Jump Start with FileMaker Starter Solutions - uLearnIt
- LearningFileMaker.com releases Video Training for Startups and Entrepreneurs
- FileMaker 15 Beginner, Intermediate and Advanced Video Training from John Mark Osborne
- FileMaker Lesson for Context Reports From Vince Menanno