I have a question regarding XML FOR PATH and SQL Server 2005. I have been using it successfully but I have run in to an issue I was hoping you could help with.
I have a couple of tables and I want to do this:
Expand|Select|Wrap|Line Numbers
- select
- StringValue as '@' + XmlFieldName,
- from defaultaddressfielddefs daf
- inner join addressfields af on af.AddressFieldDefId = daf.AddressFieldDefId
- for xml path('Address'), type
How can this be done within a select statement?
Thanks!
Brian