dbTalk Databases Forums  

Re: Parameters

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Re: Parameters in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JFB
 
Posts: n/a

Default Re: Parameters - 07-17-2003 , 03:37 PM






hi sardinka,
Should be....
@Query = @Inactive

JFB

"sardinka" <sardinka2 (AT) yahoo (DOT) com> wrote

Quote:
I have following stement in SQL execute task:
Declare @Inactive as int
Set @Inactive = (Select Count(*)
from test)
Select @Inactive
The next is:
Execute CDO_SendMail
@From = 'test (AT) msn (DOT) com',
@To= 'test1 (AT) msn (DOT) com',
@Cc = '',
@Bcc = '',
@Subject = 'Reports',
@MessageFormat = 0,
@Message = ''
How do I pass @Inactive into Message?



Reply With Quote
  #2  
Old   
sardinka
 
Posts: n/a

Default Re: Parameters - 07-18-2003 , 11:50 AM






Should be like this?
Execute CDO_SendMail
@From = 'test (AT) msn (DOT) com',
@To= 'test1 (AT) msn (DOT) com',
@Cc = '',
@Bcc = '',
@Subject = 'Reports',
@MessageFormat = 0,
@Message = '' , @Query=@Inactive

I don't have @query parametrs.

Reply With Quote
  #3  
Old   
JFB
 
Posts: n/a

Default Re: Parameters - 07-21-2003 , 08:49 AM



Ok,
Well try to replace @message for @query
if doesnt work then use regular email utility from sql, more information you
can find in BOL.
JFB


CREATE PROCEDURE emailTest
AS
DECLARE @temp varchar(512), @emailSubject varchar(80)
SET @emailSubject = 'Counts for Test'
SET @temp = 'SELECT count(col001) as exp1
FROM test'
EXEC master.dbo.xp_sendmail 'email (AT) address (DOT) com',
@subject=@emailSubject,
@query=@temp
GO


"sardinka" <sardinka2 (AT) yahoo (DOT) com> wrote

Quote:
Should be like this?
Execute CDO_SendMail
@From = 'test (AT) msn (DOT) com',
@To= 'test1 (AT) msn (DOT) com',
@Cc = '',
@Bcc = '',
@Subject = 'Reports',
@MessageFormat = 0,

I don't have @query parametrs.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.