By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
| OperationId | AccountNo | Change | CummulativeAmount |
|---|---|---|---|
| 1 | 100 | 1.00 | 1.00 |
| 2 | 100 | 2.00 | 3.00 |
| 3 | 100 | 3.00 | 6.00 |
| 4 | 100 | 4.00 | 10.00 |
| 5 | 200 | 11.00 | 11.00 |
| 6 | 200 | 22.00 | 33.00 |
| 7 | 200 | 33.00 | 66.00 |
| 8 | 200 | 44.00 | 110.00 |
| OperationId | AccountNo | Change | CummulativeAmount |
|---|---|---|---|
| 1 | 100 | 1.00 | 1.00 |
| 2 | 100 | 2.00 | 3.00 |
| 3 | 100 | 3.00 | 6.00 |
| 4 | 100 | -5.00 | 1.00 |
| 5 | 200 | 11.00 | 11.00 |
| 6 | 200 | 22.00 | 33.00 |
| 7 | 200 | 33.00 | 66.00 |
| 8 | 200 | 44.00 | 110.00 |
Msg 547 Level 16 State 0 Line 3
The UPDATE statement conflicted with the CHECK constraint "CK_Operation_ValidateOperationSeries". The conflict occurred in database "fiddle_51e82f96a48e42c38b0714f3069004a2", table "dbo.Operation".
Msg 3621 Level 0 State 0 Line 3
The statement has been terminated.
| OperationId | AccountNo | Change | CummulativeAmount |
|---|---|---|---|
| 1 | 100 | 1.00 | 1.00 |
| 2 | 100 | 2.00 | 3.00 |
| 3 | 100 | 3.00 | 6.00 |
| 4 | 100 | -3.00 | 3.00 |
| 5 | 200 | 11.00 | 11.00 |
| 6 | 200 | 22.00 | 33.00 |
| 7 | 200 | 33.00 | 66.00 |
| 8 | 200 | 44.00 | 110.00 |
| OperationId | AccountNo | Change | CummulativeAmount |
|---|---|---|---|
| 1 | 100 | 1.00 | 1.00 |
| 2 | 100 | 2.00 | 3.00 |
| 3 | 100 | 1.00 | 4.00 |
| 4 | 100 | -3.00 | 1.00 |
| 5 | 200 | 11.00 | 11.00 |
| 6 | 200 | 22.00 | 33.00 |
| 7 | 200 | 33.00 | 66.00 |
| 8 | 200 | 44.00 | 110.00 |
| OperationId | AccountNo | Change | CummulativeAmount |
|---|---|---|---|
| 1 | 100 | 1.00 | 1.00 |
| 2 | 100 | 2.00 | 3.00 |
| 3 | 100 | 1.00 | 4.00 |
| 4 | 100 | -3.00 | 1.00 |
| 5 | 200 | 11.00 | 11.00 |
| 6 | 200 | 22.00 | 33.00 |
| 7 | 200 | 33.00 | 66.00 |
| 8 | 200 | 44.00 | 110.00 |
| 9 | 200 | -110.00 | 0.00 |
Msg 547 Level 16 State 0 Line 2
The INSERT statement conflicted with the CHECK constraint "CK_Operation_ValidateOperationSeries". The conflict occurred in database "fiddle_51e82f96a48e42c38b0714f3069004a2", table "dbo.Operation".
Msg 3621 Level 0 State 0 Line 2
The statement has been terminated.