Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
Pri
Starting Member
5 Posts |
Posted - 2008-12-26 : 15:30:57
|
Hi,I have created a job that has 2 steps step 1 - create Excel file.step - send excel file in email.Both steps gets excuted sucessvily but sometimes I recieve emails and sometimes not. Please help me I am stuck .This is the code for sending emails. EXEC msdb..sp_send_dbmail @profile_name = 'SQLAdminProfile', @recipients = @Usermail, @subject = 'Sourcing Reveune Export File', @file_attachments = '\\bosintranetdev\Reports\Excel\SourcingRevenueExport.xls', @exclude_query_output = 1 if @@error = 0 Update SendSourceRevenue Set EmailStatus='Y', UpdatedOn=GetDate() where RequestedId = @ResquestId |
|
|
|
|