Viewing 15 posts - 19,216 through 19,230 (of 22,219 total)
Output to what? I mean what am I outputing to? Sqlcmd can just output to a file pretty easily if that's what you need.
"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
December 1, 2008 at 7:08 am
You would want to use it with any of the ORM tools that try to walk the structure of the data returned. By masking the table structure off behind 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
December 1, 2008 at 7:06 am
I'd suggest using the TOP and an ORDER BY within the sub-query instead. Assuming there is an index for the ORDER BY clause to use, I think you'll see better...
"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
December 1, 2008 at 7:01 am
As everyone else has said, it depends.
I used to use the approach of an identity column on most, if not all, tables. I've learned better. Now I tend towards what...
"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
December 1, 2008 at 6:54 am
The way I've done it previously is to output the procedure to XML and store it on the side. Then as you make adjustements to the query, you can compare...
"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
December 1, 2008 at 6:45 am
Oops. Missed that this was SQLCMD
That's OK. You can use SQLCMD variables the same way, still using OUTPUT parameters. For more on SQL Command variables, this is BOL: ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_1devconc/html/793495ca-cfc9-498d-8276-c44a5d09a92c.htm
Or online...
"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
December 1, 2008 at 6:37 am
Use output parameters. They work a little like this:
--create a procedure
CREATE PROCEDURE dbo.MyProc
@ID int OUTPUT
AS
SELECT ID FROM schema.Table
GO
--now you can call the proc like this
DECLARE @LocalId int
EXEC dbo.MyProc @ID =...
"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
December 1, 2008 at 6:33 am
I think you've hit the nail on the head here Tony. I don't agree with either of the wild fringe groups. I think that well designed apps take advantage of...
"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
December 1, 2008 at 6:16 am
Permits? We don't need no stinking permits.
Seriously though, the main reason I keep coming back here, well, in addition to learning something every single day, is that the tone is...
"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
December 1, 2008 at 5:50 am
Well, it was a thrilling moment, I don't mind saying. I'll be picking up one of those integrated face sheild/helmet/ear protection things soon (read ASAP). First time in 10 years...
"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
November 30, 2008 at 8:08 am
I'm sort of loving the long weekend. I'm busting butt on the stupid book and I'm chain-sawing & splitting wood to get ready for the winter.
Broke a chain for...
"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
November 30, 2008 at 7:12 am
rbarryyoung (11/29/2008)
Lynn Pettis (11/29/2008)
I just find it pretentious to list all those certs. It begs the question, who is he trying to impress.
Probably himself. Seriously. It's easy...
"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
November 30, 2008 at 7:03 am
rbarryyoung (11/28/2008)
"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
November 28, 2008 at 2:31 pm
May as well chime in on this one.
First off, Phil, feel lucky. At least your developers are still at least using the words "data." We've had a rash of 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
November 28, 2008 at 6:54 am
Yikes! I'd say so. Upgrades to the data model must be entertaining.
"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
November 28, 2008 at 6:28 am
Viewing 15 posts - 19,216 through 19,230 (of 22,219 total)