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

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

      1. <tfoot id='tNHlt'></tfoot>

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

        • <bdo id='tNHlt'></bdo><ul id='tNHlt'></ul>
      2. 使用 SQL 編輯 XML 列.不那么結(jié)構(gòu)化的 XML

        Edit XML column using SQL . Not so structured XML(使用 SQL 編輯 XML 列.不那么結(jié)構(gòu)化的 XML)

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

          • <small id='HpVPy'></small><noframes id='HpVPy'>

            <tfoot id='HpVPy'></tfoot>

                <tbody id='HpVPy'></tbody>
              <legend id='HpVPy'><style id='HpVPy'><dir id='HpVPy'><q id='HpVPy'></q></dir></style></legend>

                  <i id='HpVPy'><tr id='HpVPy'><dt id='HpVPy'><q id='HpVPy'><span id='HpVPy'><b id='HpVPy'><form id='HpVPy'><ins id='HpVPy'></ins><ul id='HpVPy'></ul><sub id='HpVPy'></sub></form><legend id='HpVPy'></legend><bdo id='HpVPy'><pre id='HpVPy'><center id='HpVPy'></center></pre></bdo></b><th id='HpVPy'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='HpVPy'><tfoot id='HpVPy'></tfoot><dl id='HpVPy'><fieldset id='HpVPy'></fieldset></dl></div>
                  本文介紹了使用 SQL 編輯 XML 列.不那么結(jié)構(gòu)化的 XML的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)吧!

                  問題描述

                  限時送ChatGPT賬號..

                  如何通過獲取XXX"的新標(biāo)簽來編輯 XML,而不是結(jié)構(gòu)化的 xml.需要幫助,我對 XML 和 XQuery 非常陌生.如果 X 沒有,則必須為 X 獲取新標(biāo)簽(節(jié)點),在 1 的情況下只需要插入 1.有沒有辦法在更大范圍內(nèi)操作字符串

                  How to edit XML by getting new tags for 'XXX', not so structured xml. Need help, I am very new to XML and XQuery. Have to get new tags (nodes) for X if it is none, in case of 1 need to insert 1 only. is there any way to manipulate string on larger scale

                  <NewAttributeRules>
                  <items>
                  <NewAttributeItem>
                    <Scale>CAAA</Scale>
                    <ScaleName>OC07</ScaleName>
                    <comment />
                    <positiveRules>
                      <NewAttributeRule type="POSITIVE">
                        <conditions>
                          <InCondition column="PPRD" colDataType="STRING">
                            <values>
                              <string>CAAAEXTENDED</string>
                            </values>
                          </InCondition>
                        </conditions>
                      </NewAttributeRule>
                    </positiveRules>
                    <negativeRules />
                   </NewAttributeItem>
                  
                  
                   <NewAttributeItem>
                    <Scale>high TOTAL OTHERS</Scale>
                    <ScaleName>b007</ScaleName>
                    <comment />
                    <positiveRules>
                      <NewAttributeRule type="POSITIVE">
                        <conditions>
                          <InCondition column="ATC3" colDataType="STRING">
                            <values>
                              <string>B10787 EXT</string>
                            </values>
                          </InCondition>
                        </conditions>
                      </NewAttributeRule>
                    </positiveRules>
                    <negativeRules>
                      <NewAttributeRule type="NEGATIVE">
                        <conditions>
                          <InCondition column="PPRD" colDataType="STRING">
                            <values>
                              <string>hkJKKK</string>
                              <string>GAGHA</string>
                              </values>
                          </InCondition>
                        </conditions>
                      </NewAttributeRule>
                      </negativeRules>
                     </NewAttributeItem>
                        
                  
                  <NewAttributeItem>
                    <Scale>***XXX***</Scale>
                    <ScaleName>OC07</ScaleName>
                    <comment />
                    <positiveRules />
                    <negativeRules />
                  </NewAttributeItem>
                  <NewAttributeItem>
                    <Scale>***XXX***</Scale>
                    <ScaleName>OC07</ScaleName>
                    <comment />
                    <positiveRules />
                    <negativeRules />
                   </NewAttributeItem>
                  
                  <NewAttributeItem>
                    <Scale>***XXX***</Scale>
                    <ScaleName>b007</ScaleName>
                    <comment />
                    <positiveRules />
                    <negativeRules />
                   </NewAttributeItem>
                  <NewAttributeItem>
                    <Scale>***XXX***</Scale>
                    <ScaleName>b007</ScaleName>
                    <comment />
                    <positiveRules />
                    <negativeRules />
                   </NewAttributeItem>
                  
                  </items>
                  </NewAttributeRules>
                  

                  推薦答案

                  好的,現(xiàn)在 XML 是有效的...

                  Okay, now the XML is valid...

                  連同來自您的其他問題的信息,我建議采用這種方法:

                  Together with the information form your other question I'd suggest this approach:

                  我把你的 XML 放入一個聲明的變量中

                  I put your XML into a declared variable

                  declare @xml xml=
                  N'<NewAttributeRules>
                    <items>
                      <NewAttributeItem>
                        <Scale>CAAA</Scale>
                        <ScaleName>OC07</ScaleName>
                        <comment />
                        <positiveRules>
                          <NewAttributeRule type="POSITIVE">
                            <conditions>
                              <InCondition column="PPRD" colDataType="STRING">
                                <values>
                                  <string>CAAAEXTENDED</string>
                                </values>
                              </InCondition>
                            </conditions>
                          </NewAttributeRule>
                        </positiveRules>
                        <negativeRules />
                      </NewAttributeItem>
                      <NewAttributeItem>
                        <Scale>high TOTAL OTHERS</Scale>
                        <ScaleName>b007</ScaleName>
                        <comment />
                        <positiveRules>
                          <NewAttributeRule type="POSITIVE">
                            <conditions>
                              <InCondition column="ATC3" colDataType="STRING">
                                <values>
                                  <string>B10787 EXT</string>
                                </values>
                              </InCondition>
                            </conditions>
                          </NewAttributeRule>
                        </positiveRules>
                        <negativeRules>
                          <NewAttributeRule type="NEGATIVE">
                            <conditions>
                              <InCondition column="PPRD" colDataType="STRING">
                                <values>
                                  <string>hkJKKK</string>
                                  <string>GAGHA</string>
                                </values>
                              </InCondition>
                            </conditions>
                          </NewAttributeRule>
                        </negativeRules>
                      </NewAttributeItem>
                      <NewAttributeItem>
                        <Scale>***XXX***</Scale>
                        <ScaleName>OC07</ScaleName>
                        <comment />
                        <positiveRules />
                        <negativeRules />
                      </NewAttributeItem>
                      <NewAttributeItem>
                        <Scale>***XXX***</Scale>
                        <ScaleName>OC07</ScaleName>
                        <comment />
                        <positiveRules />
                        <negativeRules />
                      </NewAttributeItem>
                      <NewAttributeItem>
                        <Scale>***XXX***</Scale>
                        <ScaleName>b007</ScaleName>
                        <comment />
                        <positiveRules />
                        <negativeRules />
                      </NewAttributeItem>
                      <NewAttributeItem>
                        <Scale>***XXX***</Scale>
                        <ScaleName>b007</ScaleName>
                        <comment />
                        <positiveRules />
                        <negativeRules />
                      </NewAttributeItem>
                    </items>
                  </NewAttributeRules>';
                  

                  --和之前一樣,CTE 將讀取 ScaleName 以供稍后分組,但會讓整個節(jié)點 保持原樣

                  --As before, the CTE will read the ScaleName for later grouping, but will let the whole node as is

                  WITH ScaleNames AS
                  (
                      SELECT  ai.query('.') AS AiNode
                             ,ai.value('(ScaleName)[1]','nvarchar(100)') AS ScaleName
                      FROM @xml.nodes('/NewAttributeRules/items/NewAttributeItem') AS A(ai)
                      WHERE ai.value('(Scale)[1]','nvarchar(100)')<>'***XXX***'
                  )
                  

                  --此 SELECT 將使用現(xiàn)有節(jié)點重建整個 XML,并添加兩倍的 XXX 節(jié)點.

                  --This SELECT will rebuild the whole XML using the existing nodes and adding two times the XXX nodes.

                  SELECT
                  (
                      SELECT (
                                  SELECT x.AiNode AS [node()]
                                  FROM ScaleNames AS x
                                  WHERE x.ScaleName=ScaleNames.ScaleName
                                  FOR XML PATH(''),TYPE
                             ) AS [node()]
                            ,(SELECT
                               (SELECT '***XXX***' AS Scale, ScaleName, '' AS comment, '' AS positiveRules, '' AS negativRules FOR XML PATH('NewAttributeItem'),TYPE )
                              ,(SELECT '***XXX***' AS Scale, ScaleName, '' AS comment, '' AS positiveRules, '' AS negativRules FOR XML PATH('NewAttributeItem'),TYPE)
                              FOR XML PATH(''),TYPE
                             ) AS [node()]
                      FROM ScaleNames
                      GROUP BY ScaleName
                      ORDER BY ScaleName
                      FOR XML PATH(''),ROOT('items'),TYPE
                  )
                  FOR XML PATH(''),ROOT('NewAttributeRules')
                  

                  結(jié)果

                  <NewAttributeRules>
                    <items>
                      <NewAttributeItem>
                        <Scale>high TOTAL OTHERS</Scale>
                        <ScaleName>b007</ScaleName>
                        <comment />
                        <positiveRules>
                          <NewAttributeRule type="POSITIVE">
                            <conditions>
                              <InCondition column="ATC3" colDataType="STRING">
                                <values>
                                  <string>B10787 EXT</string>
                                </values>
                              </InCondition>
                            </conditions>
                          </NewAttributeRule>
                        </positiveRules>
                        <negativeRules>
                          <NewAttributeRule type="NEGATIVE">
                            <conditions>
                              <InCondition column="PPRD" colDataType="STRING">
                                <values>
                                  <string>hkJKKK</string>
                                  <string>GAGHA</string>
                                </values>
                              </InCondition>
                            </conditions>
                          </NewAttributeRule>
                        </negativeRules>
                      </NewAttributeItem>
                      <NewAttributeItem>
                        <Scale>***XXX***</Scale>
                        <ScaleName>b007</ScaleName>
                        <comment />
                        <positiveRules />
                        <negativRules />
                      </NewAttributeItem>
                      <NewAttributeItem>
                        <Scale>***XXX***</Scale>
                        <ScaleName>b007</ScaleName>
                        <comment />
                        <positiveRules />
                        <negativRules />
                      </NewAttributeItem>
                      <NewAttributeItem>
                        <Scale>CAAA</Scale>
                        <ScaleName>OC07</ScaleName>
                        <comment />
                        <positiveRules>
                          <NewAttributeRule type="POSITIVE">
                            <conditions>
                              <InCondition column="PPRD" colDataType="STRING">
                                <values>
                                  <string>CAAAEXTENDED</string>
                                </values>
                              </InCondition>
                            </conditions>
                          </NewAttributeRule>
                        </positiveRules>
                        <negativeRules />
                      </NewAttributeItem>
                      <NewAttributeItem>
                        <Scale>***XXX***</Scale>
                        <ScaleName>OC07</ScaleName>
                        <comment />
                        <positiveRules />
                        <negativRules />
                      </NewAttributeItem>
                      <NewAttributeItem>
                        <Scale>***XXX***</Scale>
                        <ScaleName>OC07</ScaleName>
                        <comment />
                        <positiveRules />
                        <negativRules />
                      </NewAttributeItem>
                    </items>
                  </NewAttributeRules>
                  

                  這篇關(guān)于使用 SQL 編輯 XML 列.不那么結(jié)構(gòu)化的 XML的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網(wǎng)!

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

                  相關(guān)文檔推薦

                  Can I figure out a list of databases and the space used by SQL Server instances without writing SQL queries?(我可以在不編寫 SQL 查詢的情況下找出數(shù)據(jù)庫列表和 SQL Server 實例使用的空間嗎?) - IT屋-程序員軟件開發(fā)
                  How to create a login to a SQL Server instance?(如何創(chuàng)建對 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()?(為什么會出現(xiàn)“數(shù)據(jù)類型轉(zhuǎn)換錯誤?使用 ExecuteNonQuery()?)
                  How to show an image from a DataGridView to a PictureBox?(如何將 DataGridView 中的圖像顯示到 PictureBox?)
                  WinForms application design - moving documents from SQL Server to file storage(WinForms 應(yīng)用程序設(shè)計——將文檔從 SQL Server 移動到文件存儲)
                  1. <i id='Vhp1i'><tr id='Vhp1i'><dt id='Vhp1i'><q id='Vhp1i'><span id='Vhp1i'><b id='Vhp1i'><form id='Vhp1i'><ins id='Vhp1i'></ins><ul id='Vhp1i'></ul><sub id='Vhp1i'></sub></form><legend id='Vhp1i'></legend><bdo id='Vhp1i'><pre id='Vhp1i'><center id='Vhp1i'></center></pre></bdo></b><th id='Vhp1i'></th></span></q></dt></tr></i><div class="qwawimqqmiuu" id='Vhp1i'><tfoot id='Vhp1i'></tfoot><dl id='Vhp1i'><fieldset id='Vhp1i'></fieldset></dl></div>

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

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

                        • <tfoot id='Vhp1i'></tfoot>
                            <tbody id='Vhp1i'></tbody>
                          <legend id='Vhp1i'><style id='Vhp1i'><dir id='Vhp1i'><q id='Vhp1i'></q></dir></style></legend>
                          • 主站蜘蛛池模板: 久草网在线视频 | 久久精片 | 国产一区精品在线 | 国产精品永久久久久 | 日韩视频国产 | 欧美二区在线 | 美女亚洲一区 | 日韩一二区在线观看 | 91免费看片 | 精品欧美乱码久久久久久 | 久久久一区二区三区 | 成在线人视频免费视频 | 一区二区在线 | 精品国产乱码久久久久久影片 | 365夜爽爽欧美性午夜免费视频 | www久| 一级片在线播放 | 一区二区在线免费观看 | 日韩激情在线 | 久久久亚洲综合 | 我我色综合 | 久久精品一区二区三区四区 | 国内精品成人 | 亚洲免费精品一区 | 国产精品免费一区二区三区 | 国产在线中文字幕 | 一区精品视频在线观看 | 亚洲成人午夜电影 | 亚洲欧美视频一区 | 在线观看av网站永久 | 久久大陆| 蜜桃在线播放 | 人人做人人澡人人爽欧美 | 国产精品永久免费视频 | 国产精品久久久久久久7电影 | av天天看| 美女在线观看国产 | 91精品国产综合久久婷婷香蕉 | a级毛片免费高清视频 | 日韩视频免费在线 | 激情国产视频 |