| ... | @@ -209,16 +209,18 @@ AND route_status_id = 0; |
... | @@ -209,16 +209,18 @@ AND route_status_id = 0; |
|
|
|
|
|
|
|
You can either use your SQL IDE to update the data or you can use the script below. Note that the script provided is the most common/simple sql script to edit all currently routing data to the latest approver.
|
|
You can either use your SQL IDE to update the data or you can use the script below. Note that the script provided is the most common/simple sql script to edit all currently routing data to the latest approver.
|
|
|
|
|
|
|
|
* `approver_id`: Add the `approver_id` of the replacement approver. This ID is associated/related with the `ais.users.users_id`. You can find the id using the `ais.users` table and look for the `user_id`.
|
|
* `new Approver_id`: Add the `new Approver_id` to the update SET. This ID is associated/related with the `ais.users.users_id`. You can find the id using the `ais.users` table and look for the `user_id`.
|
|
|
|
* `old approver_id`: Add the `old Approver_id` to the update WHERE. This ID is associated/related with the `ais.users.users_id`. You can find the id using the `ais.users` table and look for the `user_id`.
|
|
|
* `date_updated`: Set the `date_updated` to `NULL` as it auto updates the timestamp on when the row is updated.
|
|
* `date_updated`: Set the `date_updated` to `NULL` as it auto updates the timestamp on when the row is updated.
|
|
|
* `route_status_id`: Set the `route_status_id` to `0` to update only the routes that is still on `pending`.
|
|
* `route_status_id`: Set the `route_status_id` to `0` to update only the routes that is still on `pending`.
|
|
|
|
|
|
|
|
|
|
|
|
|
``` sql
|
|
``` sql
|
|
|
UPDATE clearance.clearance_route
|
|
UPDATE clearance.clearance_route
|
|
|
SET approver_id = <ApproverId>, date_updated = NULL
|
|
SET approver_id = <new ApproverId>, date_updated = NULL
|
|
|
WHERE clearance_form_hid = <hid>
|
|
WHERE clearance_form_hid = <hid>
|
|
|
AND route_status_id = 0;
|
|
AND route_status_id = 0
|
|
|
|
AND approver_id = <old ApproverId>;
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
|
|
|
| ... | | ... | |