Click to See Complete Forum and Search --> : Trigger problem


jay_barkley
02-09-2008, 08:34 PM
I have question about TRIGGERS.
I have (4 example) VEHICLE_TABLE with VEHICLE_TYPE column and CAR_TABLE and TRUCK_TABLE also.
I need TRIGGER for INSERT/UPDATE/DELETE who well read value of VEHICLE_TYPE column in VEHICLE_TABLE and if value of VEHICLE_TYPE is CAR he will execute
INSERT/UPDATE/DELETE on CAR_TABLE and if value of VEHICLE_TYPE column in VEHICLE_TABLE is TRUCK he will execute INSERT/UPDATE/DELETE on TRUCK_TABLE.
I am using SQL Server 2005.
Is there any idea how can I solve this problem.
Thanks in advance
Jay

chazzy
02-10-2008, 08:14 AM
I think you want a stored procedure, not a trigger.