Viewing 4 posts - 1 through 4 (of 4 total)
DECLARE @XML XML
SET @XML = N'<userList>
<createdById>V353537</createdById>
<user>
<userId>NC85420</userId>
<roles>
...
July 31, 2012 at 3:48 pm
Hi,
If I would like to put the above xml in below xml format, how to get the same result. Please let me know.
DECLARE @XML XML
SET @XML = N'<baseEmployeeDepartmentReln>
<relationships>
<Department>
<deptId>1</deptId>
<deptName>Electrical</deptName>
</Department>
<Emp>
<Employee>
<empId>1</empId>
<empName>Ramu</empName>
</Employee>
<Employee>
<empId>2</empId>
<empName>Ramana</empName>
</Employee>
</Emp>
</relationships>
<relationships>
<Emp>
<Employee>
<empId>3</empId>
<empName>Raju</empName>
</Employee>
</Emp>
<Department>
<deptId>2</deptId>
<deptName>InformationTechnology</deptName>
</Department>
</relationships>
</baseEmployeeDepartmentReln>'
deptIddeptNameempIdempName
---------------------------------------------------------
1Electrical1Ramu
1Electrical2Ramana
2InformationTechnology3Raju
---------------------------------------------------------
Thanks and...
July 31, 2012 at 12:54 pm
Please help me get the below result using the given xml:
DECLARE @XML XML
SET @XML = '<baseEmployeeDepartmentReln>
<relationships>
...
July 20, 2012 at 2:40 pm
Viewing 4 posts - 1 through 4 (of 4 total)