Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Subscription Emailing report when it shouldnt....or when its not desired


Subscription Emailing report when it shouldnt....or when its not desired

Author
Message
dndaughtery
dndaughtery
SSC-Addicted
SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)

Group: General Forum Members
Points: 456 Visits: 1072
I have a datadriven subscription that uses a stored procedure.
The code is below:



declare @ReturnValue int

exec @ReturnValue = s003pSRC.sp_Par_Rate_Compare_Report_Subscription_Condition
select @ReturnValue ReturnValue


I have run the sp in ssms and I know its returning a 0 int value, why is the report still being sent out?
Lowell
Lowell
SSChampion
SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)SSChampion (14K reputation)

Group: General Forum Members
Points: 14986 Visits: 39018
dndaughtery (5/21/2013)
I have a datadriven subscription that uses a stored procedure.
The code is below:



declare @ReturnValue int

exec @ReturnValue = s003pSRC.sp_Par_Rate_Compare_Report_Subscription_Condition
select @ReturnValue ReturnValue


I have run the sp in ssms and I know its returning a 0 int value, why is the report still being sent out?

what do you think the return value represents?

by default, unless you modified the procedure to return a an integer determined within the stored procedure(ie return @@rowcount), a procedure returns zero when there are no errors.

Where in your code are you validating whether a subscription should be sent or not?

Lowell

--
help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

dndaughtery
dndaughtery
SSC-Addicted
SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)SSC-Addicted (456 reputation)

Group: General Forum Members
Points: 456 Visits: 1072
It returns an int value 1 or 0
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search