I have a table like this :
YEAR int,
Fields XML
My XML column has this structure for all rows but with different values:

How I can get this result:
YEAR ID NAME LASTNAME
---------------------------------------------------
2011 1000 Nima Agha
2011 1001 Begha Begha
2011 1002 Jigha Jigha
2011 1003 Aba Aba
2012 1034 AAA BBB
...
thanks
How about this:
You’re basically selecting
Yearfrom the base table and then extracting each<Person>node from theFieldscolumn into an “inline XML table” calledEwith a single XML column calledP(you can choose whatever names you like for those) that you again query and extract the individual elements from .