Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Register Now and get your question answered!
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 need help with email notify in sql server
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

33 Posts

Posted - 02/17/2014 :  21:26:26  Show Profile  Reply with Quote
I have a stored procedure which has 2 parameters @LastUpdateDate and @CurrentDate
I calculate the difference between these two days and store it in another variable called Sub, like this

declare @sub int
select @sub = (datediff(dd,@LastUpdate,@CurrentDate))

If the value of Sub is greater than 0, I want to send an email notification to few people that the cube has not been refreshed since last day.

Can any one tel me how I can achieve this ? I researched about configuring sqldbmail, but that didn't work for me.

Any help would be greatly appreciated


Flowing Fount of Yak Knowledge

United Kingdom
2179 Posts

Posted - 02/18/2014 :  01:43:40  Show Profile  Visit jackv's Homepage  Reply with Quote
Hi, what do you mean by sqldbmail didn't work for you? What was the problem ?Did you have configuration issues?

I'd consider adding the result in a log table - and then email the result from the log table. That way you have a record - in case the email is lost

Jack Vamvas
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000