<small id='JV2hd'></small><noframes id='JV2hd'>

    <tfoot id='JV2hd'></tfoot>

        • <bdo id='JV2hd'></bdo><ul id='JV2hd'></ul>
        <i id='JV2hd'><tr id='JV2hd'><dt id='JV2hd'><q id='JV2hd'><span id='JV2hd'><b id='JV2hd'><form id='JV2hd'><ins id='JV2hd'></ins><ul id='JV2hd'></ul><sub id='JV2hd'></sub></form><legend id='JV2hd'></legend><bdo id='JV2hd'><pre id='JV2hd'><center id='JV2hd'></center></pre></bdo></b><th id='JV2hd'></th></span></q></dt></tr></i><div id='JV2hd'><tfoot id='JV2hd'></tfoot><dl id='JV2hd'><fieldset id='JV2hd'></fieldset></dl></div>
      1. <legend id='JV2hd'><style id='JV2hd'><dir id='JV2hd'><q id='JV2hd'></q></dir></style></legend>

        在 SQLServer 2005 中查询 XML 列

        时间:2023-06-05

            <legend id='F0Ctx'><style id='F0Ctx'><dir id='F0Ctx'><q id='F0Ctx'></q></dir></style></legend>
              <tbody id='F0Ctx'></tbody>
          1. <small id='F0Ctx'></small><noframes id='F0Ctx'>

            • <bdo id='F0Ctx'></bdo><ul id='F0Ctx'></ul>

                <tfoot id='F0Ctx'></tfoot>

                  <i id='F0Ctx'><tr id='F0Ctx'><dt id='F0Ctx'><q id='F0Ctx'><span id='F0Ctx'><b id='F0Ctx'><form id='F0Ctx'><ins id='F0Ctx'></ins><ul id='F0Ctx'></ul><sub id='F0Ctx'></sub></form><legend id='F0Ctx'></legend><bdo id='F0Ctx'><pre id='F0Ctx'><center id='F0Ctx'></center></pre></bdo></b><th id='F0Ctx'></th></span></q></dt></tr></i><div id='F0Ctx'><tfoot id='F0Ctx'></tfoot><dl id='F0Ctx'><fieldset id='F0Ctx'></fieldset></dl></div>
                  本文介绍了在 SQLServer 2005 中查询 XML 列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我公司的联系人"表中有一个字段.在该表中,有一个 XML 类型列.该列包含有关特定联系人的杂项数据.例如.

                  There is a field in my company's "Contacts" table. In that table, there is an XML type column. The column holds misc data about a particular contact. EG.

                  <contact>
                  <refno>123456</refno>
                  <special>a piece of custom data</special>
                  </contact>
                  

                  contact 下面的标签对于每个联系人可以不同,我必须查询这些片段同一个表中的关系数据列.

                  The tags below contact can be different for each contact, and I must query these fragments alongside the relational data columns in the same table.

                  我使用过如下结构:

                  SELECT c.id AS ContactID,c.ContactName as ForeName,
                  c.xmlvaluesn.value('(contact/Ref)[1]', 'VARCHAR(40)') as ref,    
                  INNER JOIN ParticipantContactMap pcm ON c.id=pcm.contactid 
                  AND pcm.participantid=2140
                  WHERE xmlvaluesn.exist('/contact[Ref = "118985"]') = 1
                  

                  这个方法没问题,但是服务器需要一段时间来响应.我还研究了使用 nodes() 函数来解析 XML 节点并使用exist() 来测试节点是否包含我正在搜索的值.

                  This method works ok but, it takes a while for the Server to respond. I have also investigated using the nodes() function to parse the XML nodes and exist() to test if a nodes holds the value I'm searching for.

                  有人知道查询 XML 列的更好方法吗??

                  Does anyone know a better way to query XML columns??

                  推荐答案

                  我发现 msdn xml 最佳实践有助于处理 xml blob 列,可能会提供一些灵感...http://msdn.microsoft.com/en-us/library/ms345115.aspx#sql25xmlbp_topic4

                  I've found the msdn xml best practices helpful for working with xml blob columns, might provide some inspiration... http://msdn.microsoft.com/en-us/library/ms345115.aspx#sql25xmlbp_topic4

                  这篇关于在 SQLServer 2005 中查询 XML 列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!

                  上一篇:将具有相同标记的 XML 值分成不同的行 SQL Server 下一篇:如何查询 SQL Server XML 列并返回特定节点的所有值

                  相关文章

                  最新文章

                • <i id='nY66r'><tr id='nY66r'><dt id='nY66r'><q id='nY66r'><span id='nY66r'><b id='nY66r'><form id='nY66r'><ins id='nY66r'></ins><ul id='nY66r'></ul><sub id='nY66r'></sub></form><legend id='nY66r'></legend><bdo id='nY66r'><pre id='nY66r'><center id='nY66r'></center></pre></bdo></b><th id='nY66r'></th></span></q></dt></tr></i><div id='nY66r'><tfoot id='nY66r'></tfoot><dl id='nY66r'><fieldset id='nY66r'></fieldset></dl></div>

                    <bdo id='nY66r'></bdo><ul id='nY66r'></ul>

                      <small id='nY66r'></small><noframes id='nY66r'>

                    1. <legend id='nY66r'><style id='nY66r'><dir id='nY66r'><q id='nY66r'></q></dir></style></legend>

                      <tfoot id='nY66r'></tfoot>