AX1134
Deleting rows of data as part of an import
To delete rows from a target table during an import, create a transform step that uses the built-in function Delete rows. For example, you could use this function to clear the existing rows in a table before importing new data.
Function parameters
Parameter | Description |
---|---|
Table |
The name of the table from which to delete rows. |
Filter |
Optional. A filter used to identify rows to delete. If omitted, all rows in the table are deleted. The filter can be against the specified table or against a lookup reference table. Standard Axiom filter criteria syntax applies. NOTE: The temp table cannot be referenced in the filter. |
For example, if the table is GL2021, then the filter could be something like:
GL2021.YrMo='{YrMo}'
Where the value of YrMo is defined by an import variable.
Dept.Region='North'
Where the GL2021 table has a column Dept that looks up to the Dept table.
NOTES:
-
If you are only updating specific columns in the destination table, then you may want to use a SQL step to zero data rather than using the Delete rows function.
-
If all rows in the target table are being deleted, Axiom Enterprise Decision Support will attempt to perform a truncate instead of a delete, for improved performance. Truncate cannot be used if a filter is defined in the Delete rows function, or if the user performing the import has filtered access to the target table, or if the target table is a reference table. If truncate is used, the deleted records will not be reflected in the audit table, if auditing is enabled for the table.