久久久久久久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 列.不那么結構化的 XML

        Edit XML column using SQL . Not so structured XML(使用 SQL 編輯 XML 列.不那么結構化的 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 列.不那么結構化的 XML的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

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

                  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>
                  

                  推薦答案

                  好的,現在 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 以供稍后分組,但會讓整個節點 保持原樣

                  --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 將使用現有節點重建整個 XML,并添加兩倍的 XXX 節點.

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

                  結果

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

                  這篇關于使用 SQL 編輯 XML 列.不那么結構化的 XML的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

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

                  相關文檔推薦

                  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?)
                  WinForms application design - moving documents from SQL Server to file storage(WinForms 應用程序設計——將文檔從 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>
                          • 主站蜘蛛池模板: 在线一区视频 | 狠狠色综合欧美激情 | av片在线播放 | 欧美福利视频一区 | 亚洲精品久久久久久久久久吃药 | 免费播放一级片 | 一区二区精品 | 午夜在线影院 | 日韩亚洲视频 | 欧美一级免费黄色片 | 亚洲精品一区二区三区中文字幕 | 亚洲国产成人精品久久久国产成人一区 | 日本又色又爽又黄的大片 | 日韩国产在线观看 | 成人福利视频网站 | 亚洲综合国产精品 | 欧美激情视频一区二区三区免费 | 欧美久久久久久久久中文字幕 | 国产精品久久亚洲7777 | 国产一区二区三区在线 | 91福利网| 久草网站| 亚洲国产电影 | 亚洲在线一区二区 | 国产精品久久久久久久久久久久午夜片 | 国产精品久久影院 | 亚洲精品66 | 色婷婷亚洲一区二区三区 | 欧美最猛黑人 | 国产在线播 | 羞羞视频网站免费看 | 99爱在线免费观看 | 免费一区二区三区 | 国产精品视频久久久 | 天堂一区| 伊人久久精品一区二区三区 | 日韩精品成人网 | 九九亚洲精品 | 国外成人在线视频 | 国产在线一区二区 | 久久精品一区 |