Log in
Hot & Trending on FMT

A Handy FileMaker SQL Utility Script Select Builder

Featured A Handy FileMaker SQL Utility Script Select Builder

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:
SELECT_Builder_Script_Demo

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.

Visit Tim's Blog and Comment on this tool by Touching or Clicking Here

Keefer Rogers

Got FileMaker questions...get answers at the ORIGINAL FileMaker Forum with over 42,000 active members!

Whats with all the banner ads you ask! They really help us keep our site online...That's a hint and a reminder!

Website: www.filemakertoday.com/com/forum.php