Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 select node name from XML

Author  Topic 

ajmaly
Starting Member

11 Posts

Posted - 2010-07-29 : 10:31:26
Hello,

Below is the XML,

<PDI_Approval_Message>

<Header>

<SourceSystem Value="WF" Name="Workforce"><SourceSystem>

<TransactionType Value="WF_TS" Name="WFSheet"></TransactionType>

</Header>

<Transactions>

<Transaction>

<Attributes>

<Emp_ID>75867</Emp_ID>

<Emp_Name>AYZA</Emp_Name>

</Attributes>

</Transaction>

</Transactions>

</PDI_Approval_Message>

Now, I need a select statement for below output,

Please help...

Node_Number Node_Name
1 SourceSystem
2 TransactionType
3 Emp_ID
4 Emp_Name

ajmal
   

- Advertisement -