Viewing 15 posts - 32,521 through 32,535 (of 59,099 total)
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
Perry Whittle (9/18/2011)
Jeff Moden (9/18/2011)
This is just so wrong... What is the name of the school where they are teaching you to do such a thing in SQL Server?
RBARs R...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 18, 2011 at 7:02 pm
"Unordered"... have you an example of when ROLLUP produces incorrectly ordered results?
Also, what do you mean by it not taking us "very far forward"? unless I'm misunderstanding the requirements...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 18, 2011 at 6:25 pm
daveriya (9/17/2011)
YA LIKE THIS,BUT CAN WE USE SUM(SUM(FIELD)) ????
Just so you know, all caps in your posts is frequently identified as yelling at someone. I recommend avoiding the use...
--Jeff Moden
Change is inevitable... Change for the better is not.
September 18, 2011 at 1:50 pm
Viewing 15 posts - 32,521 through 32,535 (of 59,099 total)