Glowworm27
Programmer
Hey folks,
I have an extended stored proc that can send email.
I put the query in an Execute SQL Task in the DTS designer.
I want to be able to access a global variable so I can tell the person how long it took to run.
below is the query that I am trying to us in the Task. I tryed to use the Question mark so I could access the global variables but it throws an error. Stating that there is a syntax error.
Thanks in advance
George Oakes
Check out this awsome .Net Resource!
I have an extended stored proc that can send email.
I put the query in an Execute SQL Task in the DTS designer.
I want to be able to access a global variable so I can tell the person how long it took to run.
below is the query that I am trying to us in the Task. I tryed to use the Question mark so I could access the global variables but it throws an error. Stating that there is a syntax error.
Code:
declare @rc int
exec @rc = master.dbo.xp_smtp_sendmail
@FROM = N'goakes@tiresplus.com',
@TO = N'goakes@tiresplus.com',
@CC = N'rbrachmann@tiresplus.com',
@subject = N'Daily ReIndexing Completed',
@message = N'<HTML><H1>Daily ReIndexing Completed</H1><p>
The Daily ReIndexing Completed: Started at: ' + ? + '
</p></HTML>',
@type = N'text/html',
@server = N'10.231.1.15'
select RC = @rc
go
Thanks in advance
George Oakes
Check out this awsome .Net Resource!