Viewing 15 posts - 5,851 through 5,865 (of 8,416 total)
You can get the SQL statements defining the object from the OBJECT_DEFINITION function. I'm not sure I'd like to write a parser for it though.
An easier way might be...
February 26, 2010 at 9:04 pm
Just noticed that this is the SQL Server 2008 forum, so also look at GROUPING SETS.
Books Online:
February 26, 2010 at 8:57 pm
A better way to handle the NULLs generated by ROLLUP or CUBE is to use the GROUPING function.
An excellent example can be found in Books Online: Summarizing Data Using ROLLUP
Paul
February 26, 2010 at 8:54 pm
And, finally, here is the (fully configurable and generally awesome) test rig code, for those that like to play along at home:
-- Switch to tempdb
USE tempdb;
-- Suppress 'x row(s) affected'...
February 26, 2010 at 8:38 pm
On to Performance then.
Result: It depends :w00t:
Well it might. The original test rig had one row per section, which is probably not the most common scenario in the real...
February 26, 2010 at 8:35 pm
Before moving on to performance, I'd just like to get correctness out of the way 😛
The NULLIF solution bothers me (not Peter's refined version):
DECLARE @T
TABLE (section INTEGER NOT...
February 26, 2010 at 8:21 pm
I've just received permission from Itzik to share my implementation with you, so I can finally post the test rig from his Calculating Concurrent Sessions article and my CLR UDA...
February 25, 2010 at 8:50 pm
Alvin Ramard (2/25/2010)
Is it just me or is it getting a bit thechnical in here? 😎
It was for a bit, yes. Happy to talk about phone-related things now...
February 25, 2010 at 5:45 pm
Most of the methods shown are problematic - some because they're not guaranteed to work, others because performing an aggregate over a function is always bad news for performance. ...
February 25, 2010 at 6:52 am
Isn't T-SQL the wrong tool for this sort of job?
For the curve-fitting, pass a number of built-in Point spatial data types (with geometry and geography variants) to a user-defined aggregate...
February 25, 2010 at 6:24 am
klineandking (2/22/2010)
good afternoon guys am trying to find a better way to rewrite this code, i inherited it from some one else, any help would be welcome
I can help with...
February 25, 2010 at 6:06 am
Hi Chris,
How about this:
DECLARE @UserRole
TABLE (
row_id INTEGER IDENTITY PRIMARY KEY,
...
February 25, 2010 at 5:51 am
Barry,
Made a few improvements and it's now 30%+ faster than T-SQL from 5,000 rows upward. Below that there's no repeatable difference between the two. I sent you the...
February 25, 2010 at 5:17 am
-- Sample table
DECLARE @Question
TABLE (
question_id INTEGER IDENTITY PRIMARY KEY,
...
February 24, 2010 at 9:57 pm
RBarryYoung (2/24/2010)
February 24, 2010 at 9:10 pm
Viewing 15 posts - 5,851 through 5,865 (of 8,416 total)