久久久久久久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'>

                          • 主站蜘蛛池模板: 麻豆一区二区三区精品视频 | 日韩在线免费视频 | 免费一区| 香蕉久久网| 精品国产乱码久久久久久中文 | 日韩一区二区在线看 | 黑人性hd| 日韩欧美专区 | 亚洲精品黑人 | 日韩一区二区三区av | 欧美精品一二三区 | 久久com | 国产精品一区久久久 | 91视频大全 | 中文字幕在线播放第一页 | 欧美一区二区三区在线观看视频 | 黄色网址在线免费观看 | 99视频网 | 成人1区2区 | 91精品国产综合久久精品 | 日日夜夜天天综合 | 亚洲高清电影 | 亚洲一区 中文字幕 | 亚洲国产看片 | 国产成人99av超碰超爽 | 成人久久18免费网站 | 亚洲91视频 | 欧美a级成人淫片免费看 | 亚洲欧美精品在线 | 国产日韩电影 | 中文字幕av免费 | 国产成人jvid在线播放 | 日操操 | 亚洲精品v日韩精品 | 久久一区二区三区四区五区 | 日韩精品一区二区三区 | 一区二区三区四区不卡 | 永久av | 九九亚洲 | 精品久久久久一区二区国产 | 亚洲精品日本 |