robsuttonjr
MIS
I have 2 tables.
Table1: Inventory_Location
fields: Location_ID, Item_ID, Quantity_On_Hand
Table2: Inventory_History
Fields: Location_ID, Item_ID, Quantity, GL_Number
I need to insert records into the Inventory_History then
have a trigger insert/update into Inventory_Location
(the trigger would have to update records found in Inventory_Location or insert new records). Based on this can someone suggest a trigger that would accomplish this or should I be doing this in a stored procedure? My reasoning for a trigger is so if I have to directly insert into the inventory_history I will always have inventory_location updated correctly. Thanks!!
Forums rule, pass it on!!!
Rob
Table1: Inventory_Location
fields: Location_ID, Item_ID, Quantity_On_Hand
Table2: Inventory_History
Fields: Location_ID, Item_ID, Quantity, GL_Number
I need to insert records into the Inventory_History then
have a trigger insert/update into Inventory_Location
(the trigger would have to update records found in Inventory_Location or insert new records). Based on this can someone suggest a trigger that would accomplish this or should I be doing this in a stored procedure? My reasoning for a trigger is so if I have to directly insert into the inventory_history I will always have inventory_location updated correctly. Thanks!!
Forums rule, pass it on!!!
Rob