I have this code:
WHERE LastReqTime < DATEADD(mi,-60,GETDATE()) AND BlockedON > 0 AND UncommitOps = 0
We've recently begun seeing empty fields in the LastReqTime. Normal data example would be 2016-05-17 17:03:42.721
As one can see by my code, I'm checking for LastReqTime older than 60 minutes. If the field is null, the code errors. I need an IF or CASE or even a nested select statement that will allow me to check the LastReqTime for notnull, I would guess !='' OR perhaps a field length greater than 0. I was hoping for a valid date/time evaluation, but apparently it's quite a bit more complicated than that. ISDATE doesn't cut it. I've done quite a bit of coding before but SQL is a different animal since I need results fast I figured I'd ask the experts here (of course it would be here). Thanks in advance.
QUESTION ABOUT POSTING: The noob note that appears to the right of this says: "Please format your code. Just highlight it and press Control-K." The menu above has ctrl+k as insert bookmark. Am I missing something?