I have two tables in my database Requests and Balance tracker which has no relation…. but I want to select data from two tables and bind it two grid…
Requests
EmpID | EmpRqsts | EmpDescription | ApproverID | ApprovedAmount | RequestPriority
1 | asdfsb | sadbfsbdf | 1 |
2 | asbfd | sjkfbsd | 1 |
Balance Tracker
EmpId | BalanceAmnt | LastUpdated | lastApprovedAmount
1 | 5000 | sdfbk |
2 | 3000 | sjbfsh |
Now I want to update both tables at a time, based on the EmpID. Whenever amount is approved, it should be updated in request table column [ApprovedAmount] and with priority…
When [ApprovedAmount] is updated [BalanceAmnt] Balance Tracker of also should be Updated by adding the amount approved,[LastUpdated],[lastApprovedAmount] should be updated with date and time
Can anyone help me with the query please….
First create a stored procedure to update your
[ApprovedAmount]columnThen use a triger to update the other table when ever [AmountApproved] column is updated
Hope this helps………