![]() There are two very simple built-in custom functions that can be used to abstract table/field references in a query. Query : "select * from Events " & If ( IsEmpty ( State ) "" " where State = ? " ).It's even possible to use variables without a dollar sign $, assuming that the ExecuteSQL is used inside Let function.Variables : $EventName = "Woodstock" $State = "NY".Query : "select * from Events where Event like ? " & If ( IsEmpty ( $State ) "" " and State = ? " ).Separate multiple parameters and variables with semicolon.To copy the query as a form of ExecuteSQL function, press shift + cmd + c.So far, so good, but you wouldn't use the static parameter value "NY" in the actual function.Query : "select Event, Venue from Events where State = ?".The result will be displayed in the Result field. Query : "select Event, Venue from Events".Note that the double quotes " are required. ![]() To explain basics, the archive of FM SQL Scratchpad includes an example solution Event Management which is one of the Starter Solutions. Note: On Windows, use ctrl and alt instead of cmd and opt respectively.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |