I want to generate XML from existing xml but values should come from some other table. For example I have following xml in a table:
<LABEL COLOR=RED> Account #: </LABEL>
<VALUE> ACCT_NUM </VALUE>
<LABEL COLOR=RED> Emp. Name: </LABEL>
<VALUE> Emp_Name </VALUE>
Table for data looks like this:
EmployeeAccount
ACCT_NUM Emp_Name
1234 Kash
Now it should generate xml in following format
<LABEL COLOR=RED> Account #: </LABEL>
<VALUE> 1234 </VALUE>
<LABEL COLOR=RED> Emp. Name: </LABEL>
<VALUE> Kash </VALUE>
I can’t find any way of doing this after two days of googling.
I am using SQL Server 2008.
any help…
I have done this using …