2015年2月25日 星期三

[SQL Server]stored procedure 發送Email

dbmail設定完成後可在stored procedure 下以下發送mail sql
exec msdb.dbo.sp_send_dbmail
@profile_name='test',   --設定檔名稱
@recipients='00@gmail.com', --收件者
@subject='test',  --主旨
@body='test001', --內文
@query='你的條件式',  --查詢條件
--@file_attachments='',  --夾帶檔
@attach_query_result_as_file=0,  -- 值為0:將@query顯示在信件內文 值為1將附加在附件內
@body_format=TEXT    --設定text格式or html格式

Visual Studio JS intellisense 失效解決方式

  試了好久,發現到工具>選項>IntelliCode js項目設定啟用,重新開啟VS就正常了! 後來發現是TypeScript3.2版有問題停用,使用4.3版的TypeScript即可