In this particular case, yes. However I can see other situations (such as a join on a date column) where the BETWEEN is not really feasible.
matk
@matk
Best posts made by matk
Latest posts made by matk
-
RE: Conversion FUN
-
RE: Conversion FUN
Out of curiosity (and for anyone interested) I just did a quick performance check on a table containing 1,000,000 rows:
- CAST(CONVERT(VARCHAR, D.Date, 106) AS SMALLDATETIME: 1732ms
- DATEADD(dy, DATEDIFF(dy, 0, D.Date), 0: 171ms
- CAST(D.Date AS date): 110ms
So the CAST(D.Date AS date) is about 15x faster than the CONVERT(VARCHAR, D.Date, 106) method.
-
RE: Conversion FUN
This is not necessarily a WTF. The code could be used to compare only the date part of two dates, ignoring the time component, since there is no date-only datatype prior to SQL Server 2008.
-
RE: Uhmm... maybe you should check your email?
The Boss might have just as well been busy doing something else, not wanting to waste time to go back to his workstation and check his email in case it wasn't even sent out yet. I've sometimes had my boss ask me that very question when he was running past my desk between meetings. Not much of a WTF IMHO.
-
RE: Security protects only up to 8 "crackers"
As someone else said, the only WTF is that may give you a wrong sense of security. You'd assume a password like "password123!$%" is pretty secure, when in fact it's not if you trim it after 8 characters.
-
RE: Peanuts
@Mr_Bad_Example said:
@lilakuh said:
But with allergies so severe as yours, I'd assume the big bold label on the front saying "Dry Roasted Peanuts" would be enough of a warning.
Or, you know, not, since the whole point of the post was that marakai isn't allergic to peanuts.
Now be honest with me, if marakai has life-threatening allergies to nuts, wouldn't you think he'd approach a bag of peanuts with appropriate caution? It's common sense that a peanut processing plant also proceses other nuts.
I guess this is my whole point. Thanks to a couple of idiots with no common sense (I.e., people who actually do need a "do not slam on finger" warning on a hammer) I'm slowly using my faith in mankind.
-
RE: Peanuts
@marakai said:
Having no desire to either be shot or have my neck be operated on with a ball-pen, I'm happy for the warning.
TRWTF is not the warning in general, since it does make sense on items where it's not immediately obvious if it contains traces of nuts, such as candy and cereal. But with allergies so severe as yours, I'd assume the big bold label on the front saying "Dry Roasted Peanuts" would be enough of a warning.
I mean, what is this country coming to? Recently I saw the standard "Do not attempt" warning on a TV spot where a woman was throwing the washing machine from the roof of her house. Really? We need a written warning for this?
-
Peanuts
I had no idea that peanuts were processed in a facility that processes peanuts.
-
RE: Reinventing Response.Redirect
@Jonathan Holland said:
Ah you are correct. Its been a very long time since I wrote any code that worked with popups, with them being evil and all :)
Regardless, its manipulating the client, not the server, so it makes no sense to use Response Redirect...after all, there is no response to redirect :)
Not sure what you mean... is this a critique of the code, or the OP?