June 19, 2009 at 9:16 am
I am not that fat and ugly...;-)
I think..:-D
-Roy
June 19, 2009 at 9:52 am
GilaMonster (6/19/2009)
Jeff Moden (6/18/2009)
Apologies to all... I got the SUM() OVER thing exactly backwards. PARTITION BY is the only part of the OVER clause that can be used. What I'd like to see is the best of both worlds on such aggregates. If you only do a PARTITION BY, have it work the way it currently works... a single total for all rows returned for that partition split for any given query. Barry was correct. The thing that's missing is the ORDER BY part and I'd like to see it do a running total if the ORDER BY were used.I think a bit more than just ORDER BY would be needed. Some of the things Itzik discusses (and this is just example syntax) is the ability to specify over what portion of the window the aggregate should run over, controlled by the order by.
So, some examples of this:
SUM(SomeValue) OVER (PARTITION BY GroupingValue ORDER BY SomeDate BETWEEN Unbounded Below and Current Row) -- A standard running total
SUM(SomeValue) OVER (PARTITION BY GroupingValue ORDER BY SomeDate BETWEEN Current Row and Unbounded Above) -- The opposite way around
AVG(SomeValue) OVER (PARTITION BY GroupingValue ORDER BY SomeDate BETWEEN Current Row -2 and Current Row +2) -- A rolling average over 5 rows
etc...
I agree... that would be much more useful.
--Jeff Moden
Change is inevitable... Change for the better is not.
June 19, 2009 at 9:56 am
Steve Jones - Editor (6/19/2009)
Now THAT put a smile on my face this morning. Apparently I'm not the only one that has bad days. I'll have to bring that up next week to Phil.
Heh... cool... maybe a little head boiling will get him to fix the code windows for IE? 😛
--Jeff Moden
Change is inevitable... Change for the better is not.
June 19, 2009 at 12:02 pm
Roy Ernest (6/19/2009)
I am not that fat and ugly...;-)I think..:-D
Fat and ugly or cute and cuddly??
-- You can't be late until you show up.
June 19, 2009 at 12:14 pm
Roy Ernest (6/19/2009)
Paul White (6/19/2009)
Kit G (6/19/2009)
Kermit the Frog?Win.
lol... You both cracked me up.... 😀
Getting a splitting headache?
😀
For best practices on asking questions, please read the following article: Forum Etiquette: How to post data/code on a forum to get the best help[/url]
June 19, 2009 at 12:20 pm
Roy Ernest (6/19/2009)
Tonight our office is arranging a bowling night for everyone. We had to create teams and our team decided to take the name "Jedi Counsel" and they have given me a Nick Name. The nick Name reminded me of someone green here... 😉
Has to be "Yoda".
June 19, 2009 at 1:04 pm
Another week, another few hundred posts to read through. At least we found out Roy isn't as fat as Jabba the Hut and Barry isn't a lawyer.
I spent the last 3+ days working like a dog cleaning out my in-laws house, 7 trips to the dump, 4 trips to a church yard sale, and 3 trips by the auctioneer got rid of most of the stuff. Got about 4 more days without internet at the house then I'll be back home and digging back into work, blogging, and writing.
I'm looking forward to catching up again with some posts on SSC. I miss the problems other people have, I don't miss my own.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
June 19, 2009 at 1:33 pm
Lynn Pettis (6/19/2009)
Roy Ernest (6/19/2009)
Tonight our office is arranging a bowling night for everyone. We had to create teams and our team decided to take the name "Jedi Counsel" and they have given me a Nick Name. The nick Name reminded me of someone green here... 😉Has to be "Yoda".
Your's was the obvious answer. I was simply trying to get a rise out of Roy with the Jabba reference. 😀
-- You can't be late until you show up.
June 19, 2009 at 2:18 pm
Lynn Pettis (6/19/2009)
Roy Ernest (6/19/2009)
Tonight our office is arranging a bowling night for everyone. We had to create teams and our team decided to take the name "Jedi Counsel" and they have given me a Nick Name. The nick Name reminded me of someone green here... 😉Has to be "Yoda".
And I was just misunderstanding and picking out another green Muppet creation. 🙂
Besides, I like Kermie, he's cute. :w00t:
-- Kit
June 19, 2009 at 6:34 pm
jcrawf02 (6/18/2009)
Tom Brown (6/18/2009)
I had a short stint working for the marketing manager of a hospitality retailer. He often got free samples of the various offerings of breweries, wine merchants, cider makers etc, which were shared with his staff. Free beer at work - O happy days. 😀Pity I couldn't cycle to that job.
reminding me of college, there was a band named 'Free Beer' that was very popular, for some reason . . .
... with the club owners especially, I'm sure.
June 19, 2009 at 6:35 pm
edit: ARRGGHH. Slow response, inadvertant double post. Apologies for padding the post count on the Thread.
While I'm here, though, it does strike me that the state of medical research in India may be in trouble if the book piracy is any indication of the ethical standards these guys are following. And yes, "kindly go boil your head" is a definite ten.
June 19, 2009 at 11:57 pm
Jeff Moden (6/19/2009)
Heh... cool... maybe a little head boiling will get him to fix the code windows for IE? 😛
I admire your persistence.
And your optimism!
😛
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
June 20, 2009 at 6:43 am
Happy Saturday, everyone
I appear to have won a year's licence for Quest's Spotlight for Sql Server, after filling in my details at their booth at the SQLBits conference!
Does anyone here use it?
June 20, 2009 at 7:29 am
mazzz (6/20/2009)
Happy Saturday, everyoneI appear to have won a year's licence for Quest's Spotlight for Sql Server, after filling in my details at their booth at the SQLBits conference!
Does anyone here use it?
Happy Sunday 😉
Yep, we use it on all our SQL Servers. It's pretty neat - probably the best tool of this sort that I have encountered so far. It doesn't expose everything you can get from every single dynamic view, but it's pretty darn good.
If you have any specific questions, I'll be happy to help if I can.
Paul
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
June 20, 2009 at 7:44 am
Paul White (6/20/2009)
mazzz (6/20/2009)
Happy Saturday, everyoneI appear to have won a year's licence for Quest's Spotlight for Sql Server, after filling in my details at their booth at the SQLBits conference!
Does anyone here use it?
Happy Sunday 😉
Oops - yes, that too!
Yep, we use it on all our SQL Servers. It's pretty neat - probably the best tool of this sort that I have encountered so far. It doesn't expose everything you can get from every single dynamic view, but it's pretty darn good.
Cool - I can see myself getting attached to it, and then management refusing to renew the licence 😛
If you have any specific questions, I'll be happy to help if I can.
Paul
Thanks Paul!
Viewing 15 posts - 5,866 through 5,880 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply