Viewing 15 posts - 42,961 through 42,975 (of 59,102 total)
I had similar feelings when PIVOT came out. Proves that "new" or "different" is frequently not better, faster, or easier to read. π
Good article David. Thanks for taking...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 5:11 pm
awp (7/18/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 4:56 pm
In fact, take a look at the following article so you can see more of what I mean... these types of reports can be made to run very fast and...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 4:03 pm
awp (7/18/2009)
I canβt understand...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 4:01 pm
First of all, that table is setup for CDR's (Call Detail Records). Rather I should say it's set up incorrectly for CDR's. Almost all of the columns are...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 12:18 pm
Gosh... even though this is just a reporting table, I still wouldn't add the 10 columns to it unless it were trully normalized data. What is in the 10...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 11:51 am
Let me come right out and say it... don't use CONVERT to strip the time... it's at least ten times slower than just about any other method.
So far as testing...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 11:44 am
Thanks for the feedback, TJ.
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 8:11 am
Absolutely, Lynn. Nicely done.
As a side bar, I used to believe that correlated sub-queries were a form of RBAR and, in many cases, they absolutely are and will have...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 7:28 am
kylejw (7/18/2009)
Thanks guys,Yes, I've used Group By but until now I've never looked at Sum from a SQL perspective. Like everything, its quite obvious when you know how π
No problem......
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 7:17 am
dave b (7/17/2009)
Yeah...I do understand...kinda. π I like the CTE solution. I was just thinking that there was a simpler way with less code.
Heh... nah... I was talking about why...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 7:05 am
tsmith (7/18/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 18, 2009 at 7:02 am
Of course, this hasn't been tested because I don't have the table structures nor the test data... but it should be close...
select FiscalMonthDTTM, left(datename(month,FiscalMonthDTTM),3) Mth,
Sum(case when TimeType='YVW Crib' then...
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2009 at 11:21 pm
dave b (7/17/2009)
Thanks Bruce! I'll give it a try.
I'm just making sure... you understand why Bruce's solution will work, correct?
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2009 at 11:14 pm
tsmith (7/17/2009)
--Jeff Moden
Change is inevitable... Change for the better is not.
July 17, 2009 at 11:11 pm
Viewing 15 posts - 42,961 through 42,975 (of 59,102 total)