Viewing 15 posts - 18,751 through 18,765 (of 22,226 total)
I'm not entirely sure what you're shooting for here either.
But, if I'm understanding you correctly, you're wondering how to use MAX in the WHERE clause.
You would do something like this...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 14, 2009 at 6:21 am
To create a common table expression (CTE) the last statment prior to the CTE must be closed off with a semi-colon, in your case:
DECLARE @sumAllProducts INT...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 14, 2009 at 6:17 am
After you work through the best practices, you can start here [/url]to work on performance.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 14, 2009 at 6:09 am
I'm assuming you're referring to data changes in the table...
Triggers are probably going to be the simplest to implement. Keep it really simple and just set a flag somewhere that...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 14, 2009 at 6:05 am
Just to take a slightly different approach, what is the clustered index on the table where the inserts are occurring? With a bit of tuning, probably including the CreateDt column...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 14, 2009 at 5:59 am
ALZDBA hit the nail on the head. You're setting the variable as a CHAR(10) and the very first parameter, 'David Howard', has 12 characters. So it's going to truncate the...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 14, 2009 at 5:56 am
Bob Hovious (1/13/2009)
Think they even had chocolate covered dill pickles one year.
HERESY!!! :w00t:
Everybody down South knows you should deep-fry those suckers and serve 'em with come-back sauce. (They'd go...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 14, 2009 at 5:34 am
Seems a little extreme... two words, Guy Fawkes.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 13, 2009 at 7:55 pm
Steve Jones - Editor (1/13/2009)
Thanks for the note and I do appreciate the kind words. I'd wear the Gears of War shirt,...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 13, 2009 at 11:55 am
GilaMonster (1/13/2009)
A single transaction is a single transaction, regardless of whether it's in one huge procedure of split up among several smaller procedures all called from a parent. Locks are...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 13, 2009 at 11:50 am
DavidB (1/13/2009)
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 13, 2009 at 11:49 am
DavidB (1/13/2009)
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 13, 2009 at 10:54 am
Steve Jones - Editor (1/13/2009)
Hmmmmm, I think I...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 13, 2009 at 10:52 am
Brandie Tarvin (1/13/2009)
I was going to make due with what I had, but I'd like to...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 13, 2009 at 10:50 am
And, SQL Server 2008 has a monitoring suite built in, although it's not as sophisticated as the offerings from Quest & Idera and others.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
January 13, 2009 at 10:11 am
Viewing 15 posts - 18,751 through 18,765 (of 22,226 total)