« GDI+ Graphics.DrawString repeatability | Main | SQL XML, formatting floats, suppressing trailing zeroes »

SQL XML access pattern

<?xml version="1.0" encoding="utf-8" ?>

<Locations xmlns:sql="urn:schemas-microsoft-com:xml-sql">

      <sql:header>

            <sql:param name="lp" />

      </sql:header>

    <sql:query>

            use Location select Name, Latitude, Longitude

            from Location

            where @lp is null or len(@lp)=0 or substring(Name,1,len(@lp))=@lp

            order by Name

            for xml auto

    </sql:query>

</Locations>

 

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsql/ac_xml1_59m4.asp

 

Post a comment

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)