How do you keep HTML tags when querying a xml using sql?

granvals

New Member
I want to keep html tags in my sql query when i write a query to generate xml tags.For example:\[code\]select '<p> this is a code</p>' as codefrom table namefor xml path (''), type\[/code\]outputs:\[code\]<code>&ltp> this is a code &lt/p> <code>\[/code\]what it should output:\[code\]<code><p> this is a code </p><code>\[/code\]How do I solve this? Thanks!
 
Back
Top