I have below xml
DECLARE @t TABLE (
ID INT IDENTITY,
Data XML
)
INSERT INTO @t (Data)
SELECT '<ROOT>
<employeeinfo>
<employee>
<employeeid>1</employeeid>
<name>first</name>
<Lname>lastname</Lname>
</employee>
<employee>
<employeeid>2</employeeid>
<name>second</name>
<Lname>lastname</Lname>
</employee>
</employeeinfo>
<salaryinof>
<salary>
<employeeid>1</employeeid>
<amount>100</amount>
</salary>
<salary>
<employeeid>2</employeeid>
<amount>200</amount>
</salary>
<salary>
<employeeid>3</employeeid>
<amount>300</amount>
</salary>
</salaryinof>
</ROOT>'
and need output like this
vishnu dalwadi