{{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'' )] [ RETURN Id() ] where ArithmeticExpressio defines a string to be executed, for example: EXEC_SQL `UPDATE CRM_Customer SET Name='John'` If SQL to be executed performs a SELECT specify the object name that the SQL returns. ===== Example ===== EXEC_SQL `SELECT CRM_Customer WHERE FirstName='Jane'` RETURN Customer 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 Aware IM manages the database. The identifier after ''OF'' can be used to identify a particular database environment, defined when connecting Aware IM to external databases. If not present the native Aware IM database is used In the example above Customer is a virtualised object and can be viewed but cannot be brought into context to interact with it.