Viewing 15 posts - 61 through 75 (of 95 total)
I included the actual execution plans from my versions in my initial post and generate the EP from your versions when I'm back at work on monday.
August 24, 2014 at 1:44 am
Thanks for the solutions,
I tried both versions, but they are slower than my version using a local variable.
It is strange that the execution plans are so very different between using...
August 22, 2014 at 7:03 am
I tried WITH RECOMPILE, and Statistics are up to date.
The table [Follow_Up] was created recently, I deleted and recreated the table an indexes, but this did not change this behavior.
August 21, 2014 at 7:51 am
Beatrix Kiddo (8/7/2014)
Or worse "It's Password, with a capital P".
It's Secret
August 8, 2014 at 4:03 am
+1
For me it's essential to get the need behind the question,
The question asked can often be rewritten as: "we do it this way can you do that for...
July 7, 2014 at 8:20 am
CREATE TABLE #Test (c1 datetime, c2 datetime, c3 bit)
INSERT #Test (c1, c2, c3)
VALUES ('2014-01-15', '2014-10-31', 1),
('2014-11-01', '2014-11-30', 0),
('2014-12-01', '2015-11-30', 0),
('2015-12-01', '2017-11-30', 0),
('2017-12-01', NULL, 0);
SELECT*,
CASE c3
WHEN 1 THEN c1
ELSE MIN(c1)...
July 7, 2014 at 2:52 am
You can try with this code:
SELECT LEFT(location,1),
SUM(Total)
FROM#Turnover
GROUPBY ROLLUP (LEFT(location,1));
This will give a total per group and a grand total.
July 7, 2014 at 1:53 am
Interesting, but when I change the order of the rows in the insert (Mary before Anita) the order of the rows in query C changes.
The result of Query C depends...
June 26, 2014 at 12:52 am
A rarely use heaps, but did some research before answering and found my answer on this page http://social.msdn.microsoft.com/Forums/sqlserver/en-US/c6783244-c558-4a23-8ce4-520ce4a87033/meaning-of-index-fragmentation-return-for-heap-tables?forum=sqldatabaseengine and got the answer "wrong"..
May 21, 2014 at 3:47 am
Tried on 2012, Ctrl+D toggles between text and grid output, Ctrl+Shift+D does nothing with me.
Lost one valuable point...
May 16, 2014 at 12:24 am
Found the answer in BOL: up to 8 secondary replicas, including 2 synchronous secondary replicas
Source: http://msdn.microsoft.com/en-us/library/cc645993(v=sql.120).aspx#High_availability
April 24, 2014 at 5:23 am
Of course @Totalprice should be 1000.00, not 200.00, that was just for checking the query...
April 19, 2014 at 2:11 pm
In addition to previous solution, I give mine:
I only added a Tally CTE to my original query, http://www.sqlservercentral.com/blogs/never_say_never/2010/03/19/tally_2D00_table_2D00_cte/
It's slow but gives the results, something to examine and optimize..
CREATE...
April 19, 2014 at 2:10 pm
This looks me as a homework job, so the OP has to find the solution, that's why I didn't give the query,
Just a hint: Min quantity = 1, max =...
April 18, 2014 at 10:15 am
Viewing 15 posts - 61 through 75 (of 95 total)