zoukankan      html  css  js  c++  java
  • TSQL使用DbMail发送多个附件

       如果您不了解DbMail,先看sp_send_dbmail.具体的T-SQL如下:
     
       1:  SET ROWCOUNT 0 
       2:  EXEC msdb.dbo.sp_send_dbmail
       3:  @profile_name = 'Your_Server_Profile',
       4:  @recipients = 'recipient.1@xyz.com; recipient.2@xyz.com',
       5:  @body = 'Reports 1 and 2 are attached',
       6:  @file_attachments = 'C:\Report Folder\Report1.TXT;C:\Report Folder\Report2.TXT',
       7:  @subject = 'Reports 1 and 2 are attached' ;

         注意你必须设置rowcount为0,希望对您有帮助。


    作者:Petter Liu
    出处:http://www.cnblogs.com/wintersun/
    本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
    该文章也同时发布在我的独立博客中-Petter Liu Blog

  • 相关阅读:
    HDU 1003——Max Sum(动态规划)
    HDU 2602 ——背包问题
    HDU 1850——Being a good boy
    HDU——2588 数论应用
    HDU1222——数论
    HDU1465——不容易系列之一(错排)
    URAL 2038 Minimum Vertex Cover
    772002画马尾
    CodeForces 19D Points
    The 2015 China Collegiate Programming Contest Game Rooms
  • 原文地址:https://www.cnblogs.com/wintersun/p/1793813.html
Copyright © 2011-2022 走看看