How would you write a SQL Script to check a record for a field called DateStamptxt of type smalldatetime and test --if it is equal to current day or previous day. Then return success/failor to say message should send or not to Database Mail?
I'm trying, I really am. But I've seen so many wrong approaches involving date(time) boundaries I despair about my inability to explain it. I've seen quite a few recently that define a non-leap year as 364 days, or 366 days and the list goes on.
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.