Viewing 15 posts - 20,101 through 20,115 (of 22,212 total)
Everyone has covered it so well up to this point, especially Phil Factor's bit. The one technical thing I would add is that a new DBA must learn the logical...
June 20, 2008 at 5:58 am
From the BOL:
KEY = Lock within an index that protects a range of keys in serializable transactions.
You're locking a range when what you really want is to lock a row.
June 20, 2008 at 5:43 am
Even though GSquared eliminated the cursor, there are still other optimizations pointed out by others that can be done to the proc.
June 20, 2008 at 5:31 am
You're using the parameter twice, once to set & once to search. It can't be done like that. You have to refer to the column twice, but if you have...
June 20, 2008 at 5:28 am
anjan.ashok (6/19/2008)
CREATE PROCEDURE sp_replace_value (
@strcvalue varchar(100),
@strdesc nvarchar(100)
)
as
update testtbl set value=@strconfigvalue,desc=@strconfigdesc where value=@strconfigvalue
here assume we have...
June 19, 2008 at 1:09 pm
You should be able to take the same structures that I supplied and modify it for a different column and/or data type. It all works the same way.
UPDATE table
SET col1...
June 19, 2008 at 11:51 am
This was a cross-post. Answers there too:
http://www.sqlservercentral.com/Forums/Topic520048-338-1.aspx
Please don't cross-post.
June 19, 2008 at 11:38 am
You mean something like this?
CREATE PROCEDURE UpdateEmail
(@OldEmail nvarchar(275)
,@NewEmail nvarchar(275)
AS
BEGIN TRY
UPDATE MyEmail
SET Email = @NewEmail
WHERE Email = @OldEmail
END
BEGIN CATCH
RETURN ERROR_NUMBER();
END
June 19, 2008 at 11:34 am
So much for contacting people.
I'm still baffled. I'm not sure why this is happening like it is. Odd stuff.
June 19, 2008 at 11:10 am
No, it's not the same at all. 2005 really is better.
June 19, 2008 at 7:00 am
Pull up the execution plan. That will help you find out where to look.
I suspect it's this:
(D.Did in (select max(Did) from D group by Aid) ...
June 19, 2008 at 6:51 am
I can't find the documentation. Here's a support article, but it's not what I meant:
http://support.microsoft.com/kb/281671
And Kalen
http://www.sqlmag.com/Article/ArticleID/16078/sql_server_16078.html
June 19, 2008 at 6:47 am
Mike Levan (6/18/2008)
Exactly.Can you pls update my proc with your best performance ideas.
Actually, quite a few of us get paid to rewrite 500 line stored procedures. We'll help, but you...
June 19, 2008 at 6:35 am
First, I'd try posting in the SQL Server 2000 forums, not the 2005 forum.
Second, there isn't an immediate method to do this. There are some options. If you're running a...
June 19, 2008 at 6:21 am
Viewing 15 posts - 20,101 through 20,115 (of 22,212 total)