Re: Databasename Variable
From: Aaron [SQL Server MVP] (ten.xoc_at_dnartreb.noraa)
Date: 02/24/05
- Next message: Aaron [SQL Server MVP]: "Re: SQL Send Mail Problem"
- Previous message: Gabe Matteson: "Databasename Variable"
- In reply to: Gabe Matteson: "Databasename Variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 24 Feb 2005 13:51:51 -0500
You can't concatenate there, you'll have to build the message first.
DECLARE @msg VARCHAR(255), @rc INT
SET @msg = @databasename + ' Backup Succeeded.'
EXEC @rc = master..xp_smtp_sendmail
...
@message = @msg,
What does this have to do with DTS, setup, security??? Followups set to
.server only.
-- http://www.aspfaq.com/ (Reverse address to reply.) "Gabe Matteson" <gmatteson@inquery.biz.nospam> wrote in message news:##3QnDqGFHA.544@TK2MSFTNGP12.phx.gbl... > declare @rc int > exec @rc = master.dbo.xp_smtp_sendmail > @FROM = N'SRVDB1@mydomain.com', > @TO = N'gmatteson@mydomain', > @priority = N'HIGH', > @subject = N'Process Success', > @message = N'Database Backup Succeeded.', - Rather than putting Database > Backup Succeeded, I would like to put "@databasename Backup Succeeded". > @server = N'mail.mydomain.com', > @attachment = N'F:\TEST.txt' > select RC = @rc > GO > > Anyone know how to do this, this is my first stored procedure and I really > have no idea how the syntax works! thanks. > >
- Next message: Aaron [SQL Server MVP]: "Re: SQL Send Mail Problem"
- Previous message: Gabe Matteson: "Databasename Variable"
- In reply to: Gabe Matteson: "Databasename Variable"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|