Sean McNeill writes "I have table called LIST, the only purpose of this table is to keep all of my list value is a single place using a parent/child methodology to distinguish the types of lists I have and values of associated with those lists. With that said, the basic structure of the table looks like this:CREATE TABLE [dbo].[LIST] ( [LIST_ID] [varchar] (20) NOT NULL PRIMARY KEY, [LIST_NAME] [varchar] (50) NOT NULL , [LIST_ORDER] [int] NULL , [PARENT_ID] [varchar] (20) NOT NULL )
As you can see, I have a column called LIST_ORDER, this obviously is used to specify the order of a value in a list. My question is, how can I increment the value of this LIST_ORDER by 1 via a trigger or stored procedure on INSERT. This seed or increment value should start at 1 each time a row is referenced in the PARENT_ID for the first time and increment from there? I hope I was clear in my question. Thanks for your help and this valuable resource....sm"