PtboGiser

asked on

# From Access to SQL - Trigger

I have what was a simple Update Query in Access to what i am thinking should be a After update\insert Trigger in SQL.

Access Query

Im not sure how to determine if the L_T_ADD value = odd number or the L_F_ADD value = oddnumber statement should work.

Suggestions

It looks like this "x % 2" would be the way?

Thanks

Access Query

```
UPDATE SEGMENT SET SEGMENT.LeftOdd = 1
WHERE ([L_F_add] mod 2) = 1 OR ([L_F_add] = 0 AND [R_F_add] > 0 AND ([R_F_add] mod 2) = 0);
```

Im not sure how to determine if the L_T_ADD value = odd number or the L_F_ADD value = oddnumber statement should work.

Suggestions

It looks like this "x % 2" would be the way?

Thanks

ASKER CERTIFIED SOLUTION

THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.

View this solution by signing up for a free trial.

Members can start a 7-Day free trial and enjoy unlimited access to the platform.

ASKER