can any one tell me how Local.name(.) xquery function works. regarding sql construction problem i post a question in a forum and they give me answer. where Local.name(.) xquery function is used but syntax is not clear to me very well.
;with cte as
(
select x.i.value('local-name(.)','nvarchar(MAX)') as colname
,x.i.value('.','nvarchar(max)') as data
from @x.nodes('/Record/DELETED/*') as x(i))
what is the meaning of this line x.i.value('local-name(.)','nvarchar(MAX)') as colname why 'local-name(.)' what is local-name (.) what does it mean. again x.i.value('.','nvarchar(max)') as data please explain the two line in detail. i am not advance user. thanks a lot.
please guide me. thanks