Viewing 15 posts - 646 through 660 (of 1,473 total)
I'm not sure I understand what you're saying. Did you have a look at the link I posted? Your query wasn't even close to a running state before,...
September 17, 2009 at 11:49 am
Bitbucket is hinting at the second way to do this, that I disregarded (possibly prematurely) because it's not dynamic. You need to know what every possible combination of columns...
September 16, 2009 at 11:49 am
Yeah, sorry, I have a bad habit of editing previous posts that people might have already read with more info. I really need to stop that.
September 16, 2009 at 11:38 am
Your syntax is off in many different ways. Take a look at this thread, I just fixed a very similar query for someone else last week.
http://www.sqlservercentral.com/Forums/Topic785369-338-1.aspx
September 16, 2009 at 10:39 am
Some simple Dynamic SQL + COUNT DISTINCT would get you there... but that's pretty messy.
September 16, 2009 at 10:16 am
Greg Snidow (9/16/2009)
Garadin Both have advantages and disadvantages
Well I can see one, which is that mine is limited to only one year at a time. Other than that, yours...
September 16, 2009 at 10:11 am
Similar to what Greg posted, here is another method. Both have advantages and disadvantages, but together they should give you a good idea of how to use a tally...
September 16, 2009 at 9:37 am
Did you see my edit? You actually had 2 problems.
This code works perfectly fine:
--// lets create the source data
CREATE TABLE tblSource
(
...
September 16, 2009 at 8:41 am
Does it? Or did you just forget the
WHERE oldv.oldvalue newv.newvalue
😉
[Edit:] Also, in your test code, you're not generating new unique identifiers for the last two...
September 16, 2009 at 8:28 am
This is a pretty simple query if you're familiar with Tally/number tables. Take a look at the article in my signature for a full explanation of what a Tally...
September 16, 2009 at 7:26 am
That's not enough information for us to go off of. Are there any triggers on the table? Locking Contention possibly? We need a bit more information about...
September 15, 2009 at 10:56 pm
lmu92 (9/15/2009)
Reason: The values provided for STARTDATE exceed the tinyint...
September 15, 2009 at 4:02 pm
Try this.
SELECT * FROM CONTACTCALLDETv1 WHERE StartDate = 'Other'
September 15, 2009 at 2:40 pm
Bob Hovious (9/15/2009)
I can't argue with "It depends."I'm curious, Seth: Did you capture any times or stats for your million row test?
I examined...
September 15, 2009 at 2:26 pm
Jonathan
September 15, 2009 at 2:19 pm
Viewing 15 posts - 646 through 660 (of 1,473 total)