Viewing 15 posts - 1 through 15 (of 1,472 total)
Another take on it. Simple... but I think Eugene's might be faster. It's a lot closer with a physical tally table, but I think his still wins.
CREATE...
October 30, 2012 at 8:48 am
I'm just glad I decided to test it before I answered... or I'd have been wrong. :hehe:
July 1, 2011 at 10:00 am
Temp tables created in the outer SP are available to the Inner SP, so you should definitely avoid this, as creating one with the same name will be confusing... but...
July 1, 2011 at 9:47 am
filipeesch (7/1/2011)
I'm not doing simple updates. Its a logic that a simples SQL command dos not resolve.
Are you sure about that? Can you post the code?
July 1, 2011 at 9:38 am
There will likely be much better answers to follow, but I'll attempt this one.
1. There is very little difference between a clustered index scan and a table scan. ...
July 1, 2011 at 6:45 am
My pleasure.
June 24, 2011 at 12:35 pm
I think he 'cheats' by having a big repository of all these code snippets right at hand!
Yes I'm jealous =).
June 24, 2011 at 12:34 pm
Sean Lange (6/24/2011)
Excellent. Thanks Lowell. Of course now I have no excuse not to work this afternoon. 😛
Heh, well, I was watching my other monitor coming up with my own...
June 24, 2011 at 12:29 pm
Right, the triggers aren't for the selects, they're for the insert/update/deletes, so that they update back the original table when people take actions on your view that would normally be...
June 24, 2011 at 11:44 am
So even a view with instead of triggers won't work in this case to completely replace the original table in the eyes of the app? (I'm aware you probably...
June 24, 2011 at 10:02 am
SELECT Sup.NAME, T.NAME, SUM(S.Spend) Spent
FROM Suppliers Sup
INNER JOIN Spend S ON Sup.SupplierID = S.SupplierID
INNER JOIN Team T ON T.TeamID = S.TeamID
WHERE S.SupplierID IN (SELECT SupplierID FROM Spend GROUP BY SupplierID...
June 24, 2011 at 9:45 am
The answer to this might change if joins are in the equation though. I don't know that the optimizer will always choose to apply the criteria before it attempts...
June 23, 2011 at 10:58 am
It's hard to tell based on your description whether you want these values concatenated (All values in one column) or pivoted (each value in its own column, but all on...
June 23, 2011 at 7:57 am
Note that it's being removed in Denali:
(From the 2008 R2 BOL)
This feature will be removed in the next version of Microsoft SQL Server. Do not use this feature in new...
June 23, 2011 at 7:52 am
Viewing 15 posts - 1 through 15 (of 1,472 total)