Viewing 15 posts - 16 through 30 (of 422 total)
Thanks Jeff. Any improvements (performance tested of course!) will be integrated and all ideas are welcome.
Concerning credits...I'll go ahead and make sure the proper credit is applied. There's plenty to...
August 15, 2013 at 7:58 am
If a trigger is going to be used for something like this wouldn't it make more sense to use an INSTEAD OF trigger? Then to get even more granular the...
August 11, 2013 at 1:54 pm
Thanks all for the feedback. Every environment is different so it's hard to anticipate what kind of loads such a process might need to handle. In my use it was...
August 5, 2013 at 4:41 pm
Jeff Moden (8/3/2013)
August 3, 2013 at 6:44 pm
I think the site is fantastic and comprehensive without getting too "techie." Especially since it is so code oriented in some sections I think sections related to coding need lots...
August 3, 2013 at 6:38 pm
I prefer using SET ROWCOUNT @X where @X is the number of rows to display since it is compatible with all SQL versions. Using a variable with TOP(X) was added...
August 3, 2013 at 6:26 pm
I don't have adventure works installed either, so will make a guess. Does this work?
USE AdventureWorks2012;
GO
SELECT
Name
,(SELECT DISTINCT
...
July 31, 2013 at 9:05 pm
If you ever use dynamic SQL using the built-in system function 'sp_executeSQL' and try to use an OUTPUT parameter the function will not work unless you explicitly append the N'...
July 31, 2013 at 8:44 pm
If you could give us some sample data in table form it would be a lot easier to help you.
I could be totally off-base, but my first thought is to...
July 31, 2013 at 8:35 pm
With the assumption that you really do need to run a separate process for each type, then you will probably need to use dynamic SQL like this:
First the sample data:
IF...
July 30, 2013 at 2:56 pm
[See stored procedure at bottom]
IF OBJECT_ID('tempdb..#TempTable') IS NOT NULL
DROP TABLE #TempTable
CREATE TABLE #TempTable (
[RowNum] INT NOT NULL,
...
July 30, 2013 at 11:30 am
dwain.c (7/29/2013)
Steven Willis (7/29/2013)
Dwain is a master of minimilism...
I like it. I'm trying to think of a way to incorporate it in my signature.
Reminds me of the quote ChrisM...
July 29, 2013 at 7:48 pm
Also...looking at the query plans and statistics, Dwain's solution is certainly more efficient if it satifies your requirements...
July 29, 2013 at 7:25 pm
Dwain is a master of minimilism and his response is certainly more succinct than mine. But I'll post what I came up with before Dwain beat me to it. I...
July 29, 2013 at 7:19 pm
pluto1415 (7/26/2013)
SalesPersonA - Sales for Jan-June2012 - Sales for Jan-June2013
SalesPersonB - Sales for Jan-June2012 - Sales for Jan-June2013
SalesPersonC - Sales...
July 28, 2013 at 5:23 pm
Viewing 15 posts - 16 through 30 (of 422 total)