Viewing 15 posts - 32,521 through 32,535 (of 59,102 total)
sharath.chalamgari (9/21/2011)
Congrats Jeff, this will be really inspirational for other sql folks.
Thanks, Sharath. I really do hope this helps inspire others especially when it comes to sharing knowledge. ...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2011 at 8:21 pm
Anipaul (9/20/2011)
We should also thank Rich Bay and your boss 🙂 for the "accident", otherwise...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2011 at 8:08 pm
boeledi (9/21/2011)
I have 2 tables with the very same LONG structure (table_1 and table_2).
I was wondering if it would be possible to update table_1 with the content of table_2 without...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2011 at 3:47 pm
Sean Lange (9/21/2011)
venoym (9/21/2011)
I think Jeff might roll over and die if he saw either of us using his setbased splitter as the source of a cursor. :w00t:
Heh... nope... loading...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 21, 2011 at 3:43 pm
SQL Kiwi (9/20/2011)
Jeff Moden (9/20/2011)
Hmmm... based on our previous conversation, why didn't you include an ORDER BY in this particular example?
Just forgot. I used one in my final example...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2011 at 9:53 pm
Jeff Moden (9/20/2011)
SQL Kiwi (9/17/2011)
daveriya (9/16/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2011 at 9:05 pm
SQL Kiwi (9/17/2011)
daveriya (9/16/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2011 at 9:05 pm
daveriya (9/19/2011)
but just one prob ,coz of to do total i ignore --having SUM(NULLIF(BOOK,0 )) is not null,what is the alternative of...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2011 at 8:29 pm
Thanks,
Try this... it's a technique called "Pre-Aggregation" (phrase coined by Peter Larsson). It usually runs quite a bit faster than many straight forward Cross-Tab methods and is a bit...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2011 at 8:24 pm
Thanks, Perry. :blush:
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2011 at 6:18 pm
Thank you for the great feedback, Howard.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 20, 2011 at 6:11 pm
nick 2435 (9/15/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
September 19, 2011 at 9:17 pm
That's part of it but I agree... it's doesn't explicity state a given order so we'll leave it where it lays.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 19, 2011 at 4:56 pm
SQL Kiwi (9/19/2011)
Do you have a reference for this 'certain order'?
I do. As a matter of fact, it's in the link you posted.
Try this:
SELECT
e.id,
SUM(e.amount) AS id_sum,
SUM(SUM(e.amount)) OVER () AS...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 19, 2011 at 3:30 pm
SQL Kiwi (9/18/2011)
Jeff Moden (9/18/2011)
"Unordered"... have you an example of when ROLLUP produces incorrectly ordered results?
I don't need one: presentation order is never guaranteed unless there is an outer-scope ORDER...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 19, 2011 at 6:33 am
Viewing 15 posts - 32,521 through 32,535 (of 59,102 total)