Viewing 15 posts - 1,696 through 1,710 (of 8,416 total)
SQLRNNR (9/17/2011)
...This just happened to be one that I was working on as an answer to a forum question at the time of submission.
I see. Thanks for the explanation.
September 17, 2011 at 4:37 pm
Something like this?
DECLARE @Example TABLE
(
id INTEGER NOT NULL,
amount ...
September 17, 2011 at 4:32 pm
daveriya (9/16/2011)
September 17, 2011 at 2:43 pm
goodguy (9/17/2011)
Do the calculation earlier in the function, assign it to another temp variable @ANS and return that @ANS.
Better still, write a set-based T-SQL query instead of trying to use...
September 17, 2011 at 2:21 pm
Happy to report that I am first to get this right.
I don't enjoy this sort of question though - I am a human, not a T-SQL parser.
The question could have...
September 17, 2011 at 2:01 pm
vk-kirov (9/16/2011)
Good question, but the answer is totally wrong.
Exactly. I can only imagine the author did test the code before submitting this question, but made a late change to...
September 17, 2011 at 1:56 pm
okbangas (9/17/2011)
DTA is not very good either.
I agree with pretty much everything else you have said in this thread - but this statement is a bit harsh.
DTA does a pretty...
September 17, 2011 at 1:38 pm
GilaMonster (9/17/2011)
Adding a second table in to disqualify them from trivial plan optimisation...
Any subquery expression will do. This simpler (no join) form does not qualify for trivial plan:
SELECT t1.ID,...
September 17, 2011 at 1:25 pm
The question of fragmentation is an interesting one. Assuming we don't use a GUID as the clustering key, what's the issue here? It is in the nature of...
September 15, 2011 at 12:46 pm
Steve Jones - SSC Editor (9/14/2011)
September 14, 2011 at 8:55 am
HowardW (9/14/2011)
September 14, 2011 at 7:43 am
Statistics is really not my thing, but I thought I would mention a post by Rob Farley recently:
http://sqlblog.com/blogs/rob_farley/archive/2011/08/23/t-sql-thoughts-about-the-95th-percentile.aspx
Might be of interest.
September 13, 2011 at 7:04 pm
zapouk (9/13/2011)
September 13, 2011 at 7:00 pm
There are many ways to express this requirement in SQL (some would say too many - and not one that is a straightforward as the natural language form of the...
September 13, 2011 at 6:54 pm
Evil Kraig F (9/13/2011)
While everyone should strive to this level of understanding,...
September 13, 2011 at 6:24 pm
Viewing 15 posts - 1,696 through 1,710 (of 8,416 total)