sql-cte

Printing tree with SQL CTE

Hi The schema is as follows: CREATE TABLE [Structure]( [StructureId] [uniqueidentifier] NOT NULL, [SequenceNumber] [int] NOT NULL, -- order for siblings, unique per parent [ParentStructureId] [uniqueidentifier] NULL, CONSTRAINT [Structure_PK] PRIMARY KEY CLUSTERED ( [StructureId] ASC ) ) ON [PRIMARY] ALTER TABLE [Str...