This is the structure of my table
CREATE TABLE [dbo].[TableA]
(
[ObjectID] [int] IDENTITY(1,1) NOT NULL,
[CGPracticeCode] [varchar](5) NULL,
[TotalAmt] [decimal](11, 2) NULL,
[SplitAmt] [xml] NULL,
)
The value in the SplitAmt Column are in the below format, no of rows may vary
'<Values>
<Row>
<PracticeCode>BE9</PracticeCode>
<Value>20</Value>
</Row>
<Row>
<PracticeCode>BEA</PracticeCode>
<Value>3</Value>
</Row>
</Values>'
Now How do I get values like this… (No problem in repeating 1st 3 columns)
ObjectID, CGPracticeCode, TotalAmt, PracticeCode, [Value]
Have a look at this article by Alex Homer
To return the first Row elements you can use: