for xml explicit

Posted by Zu on July 8, 2010 in SQL |
SELECT 1 AS tag,
NULL AS parent,
user_id AS [li!1!title],
name AS [li!1]
FROM t_users
FOR xml explicit

comes out as:

<li title="1">user Name 1 </li>

<li title="2">user Name 2 </li>

<li title="3">user Name 3 </li>

etc.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Copyright © 2007-2012 Cheat Sheet All rights reserved.
Desk Mess Mirrored v1.8.1 theme from BuyNowShop.com.