Link to home
Start Free TrialLog in
Avatar of MimUK
MimUK

asked on

SQL Trigger on Insert to Update another table

I have a table called CASES
And I would like that when a case is inserted with case_incidenttype = 'INAFP'
That it updates a field called COMP_AFPSCONSUMED in a table called COMPANY by adding an incremental number, I have included the join below

CASES
case_primarycompanyid         case_incidenttpye        
101                                           INAFP

COMPANY
comp_companyid                    comp_afpsconsumed
101                                           2 (+1 when a case is inserted with type INAPF)


ASKER CERTIFIED SOLUTION
Avatar of MimUK
MimUK

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial