Viewing 15 posts - 2,401 through 2,415 (of 4,081 total)
Use DATEADD, with a negative number of days.
select getdate(),DATEADD(day,-3,getdate())
September 8, 2009 at 5:49 am
Question: In SSC, is the proper acronym "LOL" (laughing out loud) or "SOM" (spewing on monitor) ??
September 7, 2009 at 9:10 pm
If I can't build a reputation on SQL skills, I am forced to build one on bad puns. 😛
September 7, 2009 at 8:44 pm
I think I will start referring to you as Emperor Paulpatine.
September 7, 2009 at 8:15 pm
Many thanks, Paul.
Grant, I liked this question, even though I got it wrong. 😉
September 7, 2009 at 8:08 pm
Okay, I'm in synch with your question now. Sorry for the confusion. It seems to be my day for it.
September 7, 2009 at 5:39 pm
Thanks Paul, I was missing that. Thanks for fixing the image. Also, do you disagree with what I said about the size of the RID? ...
September 7, 2009 at 5:37 pm
PP:
I see two queries against different columns. What does that prove?
Also, do you have an index built over either date column? That...
September 7, 2009 at 1:24 pm
Hey Chris,
Thinking about your results, the table itself is smaller than the index in this case. Why? Because the underlying table has no clustered index....
September 7, 2009 at 10:21 am
I will suggest that you give us an example using sample tables and data, to accompany your picture of what the expected output should be. Simple text...
September 7, 2009 at 10:06 am
For query #1, the index scan is just a table scan in disguise.
If the index were a clustered index, I would agree. But rememeber that you often see...
September 7, 2009 at 9:43 am
I just got long-winded and gave a lecture here about how execution plans differ depending on the size and nature of the data. If anybody would care to...
September 7, 2009 at 7:38 am
I see that different people are seeing different results.
On my machine, at 100 rows, the 4th query (against #bigT) produces an index seek, and an RID lookup,...
September 7, 2009 at 7:22 am
the question is not a simple one of the structure leading to a deterministic result, but the optimiser may take very different routes in the same database structures depending on...
September 7, 2009 at 6:58 am
Winston, I think we need you to clarify something about your requirements. I noticed that you had one itemID that was associated with two different groupIDs.
Matt's solution returns...
September 6, 2009 at 9:12 pm
Viewing 15 posts - 2,401 through 2,415 (of 4,081 total)