久久久久久久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>
                          • 主站蜘蛛池模板: 国产日韩欧美在线 | a国产一区二区免费入口 | 日韩精品一区二区三区高清免费 | 日本黄色大片免费 | 免费黄篇 | 亚洲欧美视频一区 | 视频一区二区中文字幕 | 亚洲一区二区三区四区五区中文 | 免费看a | 黄色片网此 | 欧美一区二区三区大片 | 日韩在线小视频 | 午夜在线视频 | 超碰男人天堂 | 成人免费视频一区二区 | 老牛影视av一区二区在线观看 | 99热首页| aacc678成免费人电影网站 | 午夜精品福利视频 | 亚洲欧美一区二区三区在线 | 国产超碰人人爽人人做人人爱 | 国产精品久久精品 | 国产精品日日做人人爱 | 久久99国产精一区二区三区 | 一区二区三区中文字幕 | h在线| 欧美电影免费观看高清 | 在线观看成人精品 | 国产精品日韩欧美一区二区三区 | 日韩毛片网 | 日韩视频在线播放 | 国产精品免费一区二区三区 | 网址黄 | 久久69精品久久久久久久电影好 | 夜夜夜夜夜夜曰天天天 | 成年人黄色免费视频 | 亚洲小视频在线观看 | 久久久福利 | 欧美在线视频网 | www.av在线 | 一区二区三区在线免费观看 |