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

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

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

        • <bdo id='oMpFU'></bdo><ul id='oMpFU'></ul>

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

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

        使用 xquery 轉換為 html?

        Convert to html using xquery?(使用 xquery 轉換為 html?)

          • <bdo id='ixZNG'></bdo><ul id='ixZNG'></ul>

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

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

                    <tbody id='ixZNG'></tbody>
                  <tfoot id='ixZNG'></tfoot>
                  本文介紹了使用 xquery 轉換為 html?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

                  問題描述

                  限時送ChatGPT賬號..

                  我有以下數據庫電子郵件的 T-Sql.

                  I have the following T-Sql for database email.

                  -- create proc TableToHtml @table varchar(max) as
                  declare @table varchar(max) = '(select 1 a, ''one'' b union all select 2, ''two'') t '
                  declare @sql varchar(max) = '
                      declare @xml xml = (
                          select * from ' + @table + ' 
                          for xml path(''tr''), root(''table'')
                      ); 
                      select @xml'
                  declare @tmp table (x xml)
                  insert into @tmp exec(@sql) 
                  declare @x xml = (select x from @tmp)
                  select @x 
                  

                  然后它返回

                  <table>
                    <tr>
                      <a>1</a>
                      <b>one</b>
                    </tr>
                    <tr>
                      <a>2</a>
                      <b>two</b>
                    </tr>
                  </table>
                  

                  是否可以編寫 xquery 讓它返回以下 html?

                  Is it possible to write the xquery to let it returns the following html?

                  <table>
                    <tr>
                      <th>a</th>
                      <th>b</th>
                    </tr>
                    <tr>
                      <td>1</td>
                      <td>one</td>
                    </tr>
                    <tr>
                      <td>2</td>
                      <td>two</td>
                    </tr>
                  </table>
                  

                  推薦答案

                  我想出了一個更少黑客攻擊的方案.唯一的問題是如果值為空,它將創建 而不是 .將電子郵件發送到某些舊 Outlook 客戶端時會導致一些布局問題.

                  I figured out a less hacking one. The only problem is it will create <td /> instead of <td></td> if the value is null. It will cause some layout issue when the email is sent to some old Outlook clients.

                  declare @table varchar(max) = '(select 1 a, ''one'' b union all select 2, ''two'') t '
                  declare @sql varchar(max) = '
                      declare @xml xml = (
                          select * from ' + @table + ' 
                          for xml path(''tr''), root(''table'')
                      ); 
                      select @xml'
                  declare @tmp table (x xml)
                  insert into @tmp exec(@sql) 
                  declare @x xml = (select x from @tmp)
                  select @x.query('<body>
                  <table>
                    <tr>
                      {for $c in /table/tr[1]/* return element th { local-name($c) } }
                    </tr>
                    {
                      for $r in /table/* 
                      return element tr { for $c in $r/* return element td { data($c) } } 
                    }
                  </table>
                  </body>')
                  

                  這篇關于使用 xquery 轉換為 html?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 移動到文件存儲)
                2. <small id='OUrrk'></small><noframes id='OUrrk'>

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

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

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

                            <tbody id='OUrrk'></tbody>
                          <tfoot id='OUrrk'></tfoot>
                          • 主站蜘蛛池模板: 99久久中文字幕三级久久日本 | 动漫www.被爆羞羞av44 | jizz视频| 午夜ww | 久久中文网 | 精品欧美一区二区三区久久久 | 国产精品亚洲一区二区三区在线 | 91av精品| 91佛爷在线观看 | 精品国产乱码久久久久久影片 | 国产免费一区二区 | 亚洲精品在 | 久久骚| 久久精品国产免费看久久精品 | 中文字幕日韩欧美 | 亚洲精品久久久久久宅男 | 亚洲欧美日韩在线一区二区 | 777zyz色资源站在线观看 | 欧美一区永久视频免费观看 | 久久久久久久97 | 午夜激情影院 | 国产精品免费小视频 | 亚洲成人一区 | 日本一区二区三区在线观看 | 99re热精品视频 | 国产精品区二区三区日本 | 欧美日韩久久久久 | 九九亚洲| 日本成人三级电影 | 久久精品一级 | 久久久.com| 久久伊人精品 | 国产免费一区二区 | 91婷婷韩国欧美一区二区 | 欧洲一区视频 | 国产区视频在线观看 | www312aⅴ欧美在线看 | 亚洲高清视频一区二区 | 欧美成人一区二区 | 懂色一区二区三区免费观看 | 免费观看黄色片视频 |