Viewing 15 posts - 16 through 30 (of 97 total)
How about this way:
SELECT [Month] = datename(mm,min(SomeDateTime)),
Amount = SUM(SomeAmount)
FROM #MyHead
WHERE SomeDateTime >= '2010' AND SomeDateTime...
August 2, 2013 at 8:15 am
How about the comment toggle trick:
-- Toggle trick
SELECT 'Toggle line 1'/*
SELECT 'Toggle line 2'--*/
By commenting line 1 line 2 becomes active.
July 8, 2013 at 7:43 am
It's the Database!!! (5/16/2013)
Thanks however this was 3 years and 2 companys ago! 😀
:w00t:
I wasn't paying attention to the date of your post but to the more recent ones. I...
May 16, 2013 at 3:38 pm
It's the Database!!! (6/29/2009)
Does anybody know how to replicate a DB from 2005 to 2008? It will not let me add 2008 as a subscriber? any ideas?
It is about the...
May 16, 2013 at 2:14 pm
Phil Parkin (4/3/2013)
It is good to use subset of the source table, considering that you don't need the whole table content.
I don't understand what you mean - please elucidate.
What...
April 3, 2013 at 3:32 pm
vliet (4/3/2013)
April 3, 2013 at 8:51 am
If the bound errors happens than you will have to replace it with an EXISTS condition:
... and exists (select * from #test2 where id =t.id)
The author was kind of superficial...
April 3, 2013 at 7:29 am
al_kessler (4/3/2013)
P Jones (4/3/2013)
WHEN NOT MATCHED BY SOURCE AND (t.ID = s.ID) THEN DELETE;
in the original merge statement.
But I've no complaints about the...
April 3, 2013 at 5:34 am
Did I miss something? I didn't have the patience to go over all 54 pages of replies. Initially when the code for the cteTally was changed to be faster it...
March 18, 2013 at 2:46 pm
The "official" answer given is not accurate. Views 3 and 6 are not created due to syntax errors and from the rest 1, 4 and 5 don't return errors if...
January 2, 2013 at 7:29 am
--===== 2005 Method, 100,000 rows ====================================================================================
DECLARE @SomeNumber INT;
SELECT @SomeNumber = 100000 ;
WITH
E1(N) AS (SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1 UNION ALL SELECT 1...
March 26, 2012 at 8:40 am
Jeff Moden (3/24/2012)
the sqlist (3/24/2012)
ChrisM@home (3/24/2012)
the sqlist (3/24/2012)
...I think we should not be worried about how many rows are actually generated...
I couldn't disagree more. When you're looking at an overall...
March 24, 2012 at 6:52 pm
ChrisM@home (3/24/2012)
the sqlist (3/24/2012)
...I think we should not be worried about how many rows are actually generated...
I couldn't disagree more. When you're looking at an overall time of 25ms per...
March 24, 2012 at 6:24 pm
And here is for 100,000 and 1,000,000 numbers:
set statistics time on
set statistics io on
SELECT n = (n1 + n2 + n3 + n4 +n5)
FROM (((VALUES (0),(100),(200),(300),(400),(500),(600),(700),(800),(900)) t3 (n3)
CROSS JOIN...
March 24, 2012 at 6:18 am
Practically there is no difference in terms of load:
set statistics time on
set statistics io on
SELECT n = (n1 + n2 + n3 + n4)
FROM (((VALUES (0),(100),(200),(300),(400),(500),(600),(700),(800),(900)) t3 (n3)
CROSS JOIN...
March 24, 2012 at 6:02 am
Viewing 15 posts - 16 through 30 (of 97 total)