Viewing 15 posts - 21,271 through 21,285 (of 22,226 total)
Here we have a double edged sword. On the one side, I've got a more effecient tool to use in my queries. On the other side, you just handed me...
"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, 2008 at 8:12 am
I knew of the OUTPUT clause, but I'd only really thought of it for stuff like auditing. This is really useful. So, if you had a multi-row insert, you'd just...
"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, 2008 at 7:43 am
You'd use the SCOPE_IDENTITY like this:
INSERT INTO table
(Desc,UpdateDate,Whatever)
VALUES
('My Description','1/14/2007','Something)
SELECT SCOPE_IDENTITY()
That would insert a row into the table and then give you the identity value generated by that table from 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, 2008 at 6:39 am
Yeah, our company is weird about working from home too. I'm doing it today because a ton of snow was dumped on us. As much as I like my job,...
"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, 2008 at 6:30 am
Assuming I understood the question, if you're asking how to determine what the last identity value inserted was is to use the SCOPE_IDENTITY() function. This returns the last Identity value...
"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, 2008 at 6:20 am
We're only supposed to work 40 hours a week too, but we're also on call. I worked a good two-three hours this weekend because of some problems in production. It's...
"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, 2008 at 6:08 am
While I still think manipulating XML in 2000 is a waste of time, that's a very good idea. If you absolutely HAVE to do it, taking advantage of what you...
"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, 2008 at 5:46 am
2000 doesn't support XQuery. You will have to use string functions. I don't have any samples because, frankly, it wasn't worth doing in TSQL in 2000. Instead we used VB,...
"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, 2008 at 5:18 am
The most immediate benefit you'd see from using the CTE vs. a function is that the CTE will take advantage of indexes within the system as part of it's operation....
"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, 2008 at 5:14 am
Microsoft has a tool to generate load from trace files located here. You can also go for more sophisticated third party offerings like SQLScaler from Idera or Benchmark Factory from...
"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, 2008 at 5:10 am
How about taking the initial query and placing it into a sub-select and the wrapping the outer where clause around that. Then you can refer to the columns derived from...
"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, 2008 at 5:02 am
I second the vote for XML PATH. It will make a huge difference.
"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, 2008 at 4:48 am
The one piece of advice I can give you is to get the Microsoft Upgrade Advisor. This will identify the places where you need work in your existing 2000 database.
"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, 2008 at 4:27 am
Excellent. Thanks Steve.
"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, 2008 at 4:23 am
Fourth, assuming that's not homework, if it's proprietary information, you sure shouldn't be posting it willy-nilly on the internet.
"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 12, 2008 at 4:38 am
Viewing 15 posts - 21,271 through 21,285 (of 22,226 total)