Hello,
I have a SQL Server 2008 database with two tables. The first table is called Department. The second table is called Ticket. These two tables are defined as follows:
Department
----------
ID
Name
TotalTickets
Ticket
------
ID
DepartmentID
Description
AssignedTo
I'm trying to figure out a way to dynamically update the Department.TotalTickets value. When a Ticket gets added or removed, I want to automatically increment or decrement the value of the TotalTickets. Can someone please tell me the best way to do this on SQL Server 2008?
Thank you