A SQL task action is a really versatile way to make working with table data a more satisfying experience. Actions can be used to validate, backup or modify data and can be added as a button in the exTables editing area or to be executed on save.
Here are steps to create a basic validation action:
- Open the table you want to validate in exTables. Then go to the Table Designer and click Edit Actions.
- Add a new task by selecting the SQL Task. Give the new task a name, a description and select the appropriate attributes.
- Set the SQL query to:
update %TableName% set __ValidationError = NULL update %TableName% set __ValidationError = 'Below 100.000' where [Price] < 100000
- Automatically run when saving data property is handy for a validation script.
- Selecting In Parameters allows user to send custom parameter to the action.
- Click Run Action if you want to validate your data immediately.
- Click Save Tasks to save your action.