Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)

  • RE: Querying XML

    DECLARE @XML XML

    SET @XML = N'<userList>

    <createdById>V353537</createdById>

    <user>

    <userId>NC85420</userId>

    <roles>

    ...

  • RE: Querying XML

    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...

  • RE: Querying XML

    Thanks a lot.

  • RE: Querying XML

    Please help me get the below result using the given xml:

    DECLARE @XML XML

    SET @XML = '<baseEmployeeDepartmentReln>

    <relationships>

    ...

Viewing 4 posts - 1 through 4 (of 4 total)