Eliminate row in XML based on criteria
问题 here's the script to create the needed data: CREATE TABLE [dbo].[TestXML]( [ID] [int] NOT NULL, [PID] [int] NULL, [Code] [int] NULL, [Col1] [int] NULL, [Col2] [int] NULL, [Col3] [decimal](6, 2) NULL, [Col4] [decimal](6, 2) NULL, [Col5] [int] NULL, CONSTRAINT [PK_TestXML] PRIMARY KEY CLUSTERED ([ID] ASC) ) GO CREATE TABLE [dbo].[XML_Columns_Reference]( [TableName] nvarchar(10) NULL, [TableNameXML] nvarchar(10) NULL, [ColumnName] nvarchar(10) NULL, [ColumnNameXML] nvarchar(10) NULL,