Home > Archive > MS SQL Server DTS > January 2006 > DTS flow question









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DTS flow question
JuiceN

2006-01-26, 4:58 pm

Hi

I am writing a package that i want to have email me on two possible success
scenarios.

essentially, this is the conditions:

IF @result = 0
BEGIN
EXEC master..xp_cmdshell @copyfile, NO_OUTPUT
PRINT 'Operation Successful'
END
ELSE
BEGIN
PRINT 'This operation failed. Error Code:01. The source and destination
files are identical.'
END


If the first condition is met, I want to fire off an email stating success.
If the second condition is met then i want to fire off a different email.

Now, the problem is, I am not sure how to flow it. Both conditions are
successful, thus it always fires off the success email if i use an "On
Success" flow.

How do i capture the error i want to create before the email to tell it
which email to send?

Does this make sense?

Ryan

2006-01-26, 4:58 pm

Duplicate post. Please refer to other posting...

--
HTH. Ryan
"JuiceN" <JuiceN@discussions.microsoft.com> wrote in message
news:A105667F-D815-434E-9F0C- 3498368A9C6F@microso
ft.com...
> Hi
>
> I am writing a package that i want to have email me on two possible
> success
> scenarios.
>
> essentially, this is the conditions:
>
> IF @result = 0
> BEGIN
> EXEC master..xp_cmdshell @copyfile, NO_OUTPUT
> PRINT 'Operation Successful'
> END
> ELSE
> BEGIN
> PRINT 'This operation failed. Error Code:01. The source and destination
> files are identical.'
> END
>
>
> If the first condition is met, I want to fire off an email stating
> success.
> If the second condition is met then i want to fire off a different email.
>
> Now, the problem is, I am not sure how to flow it. Both conditions are
> successful, thus it always fires off the success email if i use an "On
> Success" flow.
>
> How do i capture the error i want to create before the email to tell it
> which email to send?
>
> Does this make sense?
>



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com