Link to home
Avatar of PtboGiser
PtboGiserFlag for Canada

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
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);

Open in new window


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
Avatar of PtboGiser
PtboGiser
Flag of Canada image

ASKER

Then if L_F_ADD or L_R_ADD is odd then i need to set the LEFTODD column to a value of "1"
ASKER CERTIFIED SOLUTION
Avatar of Jared_S
Jared_S

Blurred text
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.
See Pricing Options
Start Free Trial