Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
helixpoint
Constraint Violating Yak Guru
291 Posts |
Posted - 2014-12-09 : 13:31:29
|
I have a date that I am sending the Sproc...reqDateealaer in this sproc. I do a select to get the original reqDateIf the dates are the same, I do nothingIf they are different, I have to check that the lesser value of: Getdate() + 60 days or Required Date + 60 daysIf it is less, I have to throw an errorI am not sure the best way to do thisDaveHelixpoint Web Developmenthttp://www.helixpoint.com |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-12-09 : 13:33:54
|
You can use RAISERROR to throw a message back to the application.Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
helixpoint
Constraint Violating Yak Guru
291 Posts |
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2014-12-09 : 14:05:30
|
Show us some sample data then. Are you storing the reqDate in a variable?quote: If it is less
If what is less? "Required Date + 60 days"?Tara KizerSQL Server MVP since 2007http://weblogs.sqlteam.com/tarad/ |
|
|
|
|
|