Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
a_f:a:exec_sql [2022/09/01 01:23] – removed - external edit (Unknown date) 127.0.0.1a_f:a:exec_sql [2025/06/12 03:59] (current) – Change to AwareIM aware_support3
Line 1: Line 1:
 +{{tag>Index Action Action_List Process SQL Query Version:v8.4}}
 +====== EXEC_SQL ======
  
 +This action executes the specified SQL string by invoking the database engine.
 +
 +===== Syntax =====
 +
 +''EXEC_SQL'' ArithmeticExpression ()[ ''OF'' <IDENTIFIER>)] [ RETURN Id() ]
 +
 +where ArithmeticExpressio defines a string to be executed, for example:
 +
 +<code aim>EXEC_SQL `UPDATE CRM_Customer SET Name='John'` </code>
 +
 +If SQL to be executed performs a SELECT specify the object name that the SQL returns.
 +
 +===== Example =====
 +
 +<code aim>EXEC_SQL `SELECT CRM_Customer WHERE FirstName='Jane'` RETURN Customer </code>
 +
 +You have to be careful when using this acton as you can stuff up your database if you do something wrong. This action is only recommended for advanced users who understand how AwareIM manages the database.
 +
 +The identifier after ''OF'' can be used to identify a particular database environment, defined when connecting AwareIM to external databases. If not present the native AwareIM database is used 
 +
 +<callout type="primary" title="note" icon="true">In the example above Customer is a virtualised object and can be viewed but cannot be brought into context to interact with it.</callout>