Hoping some SQL guru can help me with this question.
I'm creating a new web app to help manage our projects. I want a hierarchy like:
Project
- WorkOrder
----Task
the Project.ID will be an int with identity starting at 1000
I want the WorkOrder.ID to increment by one but within the scope of the project. For instance the first work order for project 1001 would be 1, the second 2. The task.id would increment by one within the workorder scope.
1001 (project)
- 1 (work order)
---- 1 (task)
---- 2 (task)
- 2 (work order)
---- 1 (task)
---- 2 (task)
---- 3 (task)
1099 (project)
- 1 (work order)
---- 1 (task)
- 2 (work order)
---- 2 (task)
Is it possible to handle this workorder.id and task.id sequencing in SQL Server?
Thanks for any help.