KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Note: Calling 4D Methods From SQL Statements
PRODUCT: 4D | VERSION: 11.4 | PLATFORM: Mac & Win
Published On: September 17, 2009

Calling 4D project methods from SQL statements allows developers to use 4D code that already works to improve their searches. This option does not alter the structure of the SQL statement and any project method can be called from within SQL. In this way developers can have the benefit of reusing 4D code from within a SQL statement to perform more complex tasks. Developers more familiar with SQL can implement the functionality of the 4D language without worrying about syntax details so long as they understand the method’s input and expected output.

Download Complete Tech Note and example: Windows | Mac

Commented by Charles J. Miller on November 10, 2011 at 1:33 PM
Please note that if you create a method and mark it as available through SQL. You can use it right away, but if you try and change an existing method to available to SQL, you will need to restart the server for the change to occur. Additionally the call to the function simply hangs in this case.