Use this system procedure to add or delete SQL table scripts in the consolidated database.
Item |
Description |
Remarks |
---|---|---|
1 |
version name |
VARCHAR(128) |
2 |
table name |
VARCHAR(128) |
3 |
event name |
VARCHAR(128) |
4 |
script contents |
For SQL Anywhere and Microsoft SQL Server, this parameter is TEXT. For ASE, this parameter is VARCHAR(16384). For ASE prior to 12.5, this parameter is VARCHAR(255). For DB2 UDB, this parameter is VARCHAR(4000). For Oracle, this parameter is CLOB. |
To delete a table script, set the script contents parameter to NULL.
When you add a script, the script is inserted into the ml_script table and the appropriate references are defined to associate the script with the table, event and script version that you specify. If the version name is new, it is automatically inserted into the ml_version table.
The following command adds a table script associated with the upload_insert event on the Customer table.
call ml_add_table_script( 'default', 'Customer', 'upload_insert', 'INSERT INTO Customer( cust_id, name, rep_id, active ) VALUES ( {ml r.cust_id}, {ml r.name}, {ml r.rep_id}, 1 )' )