Hi
what i want is query that will update all children to 'N' if the parent [ACTIVE] field is 'N', i want all
children to be ACTIVE ='N'
--The hierarchy can be 10 levels down
--parent is 0 for top level
CREATE TABLE [dbo].[Hierarchy](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ParentID] [int] NULL,
[descr] [varchar](50) NULL,
[maingroup] [varchar](12) NULL,
[subgroup] [varchar](12) NULL,
active [varchar](2) NULL
)
Can someone show me how to do this please
Thanks for any help!
what i want is query that will update all children to 'N' if the parent [ACTIVE] field is 'N', i want all
children to be ACTIVE ='N'
--The hierarchy can be 10 levels down
--parent is 0 for top level
CREATE TABLE [dbo].[Hierarchy](
[ID] [int] IDENTITY(1,1) NOT NULL,
[ParentID] [int] NULL,
[descr] [varchar](50) NULL,
[maingroup] [varchar](12) NULL,
[subgroup] [varchar](12) NULL,
active [varchar](2) NULL
)
Can someone show me how to do this please
Thanks for any help!