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

                          • 主站蜘蛛池模板: 亚洲高清一区二区三区 | 一区二区三区四区在线视频 | 日本在线视频一区二区 | 日本不卡一区 | 国产精品视频偷伦精品视频 | 黄色一级大片在线免费看产 | 盗摄精品av一区二区三区 | 日本小电影在线 | 亚洲欧美一区二区三区国产精品 | 91av视频| 欧美四虎| 国产日韩欧美 | 精品一区二区三区不卡 | 色精品视频 | 精品国产乱码久久久久久丨区2区 | 精品欧美乱码久久久久久 | 国产欧美日韩综合精品一区二区 | 精品国产一区二区国模嫣然 | 成人免费视频7777777 | 亚洲精品久久久久久下一站 | 亚洲女人的天堂 | 九九热这里只有精品在线观看 | 嫩草网 | 国产精品美女久久久 | 亚洲黄色成人网 | 久久精品小视频 | 国产成人精品网站 | 欧美成人自拍 | 成人性生交大片免费看中文带字幕 | 国产1区 | 粉色午夜视频 | 久草网站| 天天天天操 | 欧美性区| 欧美一级免费看 | 一级片子 | 国产成人一区二区三区精 | 久久久久久久久综合 | 成人在线精品 | 精品久久影院 | 久久久91 |