久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

<legend id='jGxUD'><style id='jGxUD'><dir id='jGxUD'><q id='jGxUD'></q></dir></style></legend>

        <tfoot id='jGxUD'></tfoot>

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

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

        對 XML 中的節點值求和時 SQL Server 的奇怪行為

        strange behavior of SQL Server when sum nodes#39;s values in XML(對 XML 中的節點值求和時 SQL Server 的奇怪行為)

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

              1. <small id='QLCYl'></small><noframes id='QLCYl'>

                  <tbody id='QLCYl'></tbody>

                <tfoot id='QLCYl'></tfoot>
                  本文介紹了對 XML 中的節點值求和時 SQL Server 的奇怪行為的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我問了一個關于 sum 節點值的問題:

                  I ask a question about sum node's values:

                  總結 sql server 2008 中的一些 xml 節點值

                  請考慮此代碼:

                  Declare @xml xml 
                  set @xml='<Parent ID="p">
                       <Child ID="1">1000000000</Child > 
                       <Child ID="2">234650</Child > 
                       <Child ID="3">0</Child > 
                        </Parent >'
                  
                  Select @xml.value('sum(/Parent[@ID="p"]/Child)','bigint') as Sum
                  

                  如果你執行這個它會重新運行這個錯誤:

                  if you execute this it retrun this error:

                  Msg 8114, Level 16, State 5, Line 8將數據類型 nvarchar 轉換為 bigint 時出錯.

                  Msg 8114, Level 16, State 5, Line 8 Error converting data type nvarchar to bigint.

                  問題是它返回這個值:1.00023465E9

                  如果我以這種方式更改上述查詢就可以了:

                  if I change the above query this way it being ok:

                  Declare @xml xml 
                  set @xml='<Parent ID="p">
                       <Child ID="1">1000000000</Child > 
                       <Child ID="2">234650</Child > 
                       <Child ID="3">0</Child > 
                        </Parent >'
                  
                  Select @xml.value('sum(/Parent[@ID="p"]/Child)','float') as Sum
                  

                  為什么 Sql Server 這樣做?

                  Why Sql Server do this?

                  推薦答案

                  Sql Server 在將帶有科學記數法的值從字符串轉換為整數時出現問題,這在您運行 xpath 查詢時會發生,但是,它可以做到這是 float.

                  Sql Server has a problem converting the value with scientific notation from a string to an integer, as would happen when you run your xpath query, however, it can do this for float.

                  您可以這樣編寫查詢:

                  select @xml.value('sum(/Parent[@ID = "p"]/Child) cast as xs:long?', 'bigint')
                  

                  這篇關于對 XML 中的節點值求和時 SQL Server 的奇怪行為的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

                  【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

                  相關文檔推薦

                  SQL query to get all products, categories and meta data woocommerce/wordpress(獲取所有產品、類別和元數據的 SQL 查詢 woocommerce/wordpress)
                  Can I figure out a list of databases and the space used by SQL Server instances without writing SQL queries?(我可以在不編寫 SQL 查詢的情況下找出數據庫列表和 SQL Server 實例使用的空間嗎?) - IT屋-程序員軟件開發
                  How to create a login to a SQL Server instance?(如何創建對 SQL Server 實例的登錄?)
                  How to know the version and edition of SQL Server through registry search(如何通過注冊表搜索知道SQL Server的版本和版本)
                  Why do I get a quot;data type conversion errorquot; with ExecuteNonQuery()?(為什么會出現“數據類型轉換錯誤?使用 ExecuteNonQuery()?)
                  How to show an image from a DataGridView to a PictureBox?(如何將 DataGridView 中的圖像顯示到 PictureBox?)

                        <legend id='WAlpD'><style id='WAlpD'><dir id='WAlpD'><q id='WAlpD'></q></dir></style></legend>
                          <tbody id='WAlpD'></tbody>
                        • <bdo id='WAlpD'></bdo><ul id='WAlpD'></ul>

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

                        • <tfoot id='WAlpD'></tfoot>

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

                          • 主站蜘蛛池模板: 亚洲一区中文字幕在线观看 | 欧美aⅴ | 啪一啪| 欧美精品一区二区在线观看 | 欧产日产国产精品99 | 羞羞色在线观看 | 日韩视频在线播放 | 四虎免费视频 | 久久网一区二区 | 成人免费观看视频 | 午夜影院在线视频 | 伊人春色在线 | 日本三级精品 | 亚洲欧美日韩久久久 | 日本一区二区三区四区 | 午夜日韩 | 波多野结衣一二三区 | www.久久| 中文天堂在线一区 | 国产成人99久久亚洲综合精品 | 日韩美女在线看免费观看 | 久久涩涩 | 成在线人视频免费视频 | 精品日韩欧美一区二区 | 欧美日韩1区2区 | 涩涩鲁亚洲精品一区二区 | 五月婷婷丁香 | 中国一级特黄真人毛片免费观看 | 国产欧美在线观看 | 亚洲视频在线观看 | 精品综合| 国产欧美精品一区二区色综合 | 一区二区国产精品 | 色婷婷综合网 | 国产一区二区三区免费观看在线 | 国产精品一区二区不卡 | 成人免费视频在线观看 | 久久久久久久久久久一区二区 | 久久伊 | 99在线免费观看视频 | 精品99爱视频在线观看 |