Calling a stored procedure
In addition to the possibility to call a stored procedure in phase 3 using the function call db procedure a, alias b,c,d,e,f, there is the option "Stored Procedure" in target structure node attribute "SQL mode". If this mode is selected, target structure node attribute "SQL table/procedure" does not expect the table name, but the command to call the stored procedure. However, the call of the stored procedure will take place in phase 4, in this case. Suppose you want to call a stored procedure "insert_proc" inside a MySQL database. In that case, the syntax is
call insert_proc(@columns@) |
The placeholder @columns@ must be written exactly like this. This particular wildcard is resolved at runtime and then contains the values of all active fields of that node that are not calculation fields and that have a non-empty SQL column name. The SQL column name itself does not master, but it cannot be empty. The order of the parameters results from the order of the fields in the node. The types of the parameters correspond to the field types.
Database-specific syntax
The syntax depends on the database type. The call command used above, for example, is MySQL-specific. For other database systems, you may need another command, e.g. execute (Oracle). Please talk to your database administrator for details.
MSSQL
For MSSQL, curly brackets must be added. This can look like this, for example: {call insert_proc(columns)}
You can find more information on this in the documentation of the function call db procedure a, alias b,c,d,e,f.