July 11, 2006 at 7:35 pm
I am trying to update a table that i have with a portion of the procedure below. When ever i update this table the procedure updates the entire table.. All of the records in the table get updated..
I can only guess this is becuase of the uniqueidentifier column.
Can someone show me how to update a record with a uniqueidentifier column for the conditional ?/
Thank you very much!
Erik
IF (@CheckForUserID IS NOT NULL)
BEGIN
UPDATE [Users]
SET
[Prefix]=@Prefix
,[FirstName]= @FirstName
,[Middle]=@Middle
,[LastName]=@LastName
,[Suffix]=@Suffix
,[SecondaryEmail]=@SecondaryEmail
,[Website]=@Website
,[Note]= @Note
,[UserTypeCD]=@UserTypeCD
,[IsLockedOut]=@IsLockedOut
WHERE LOWER
(@CheckForUserID)= UserID ; <--- this will updae every record
END
Dam again!
July 11, 2006 at 7:45 pm
What are the datatypes for @CheckForUserID and UserID ?
Are you sure your column UserID contains different values?
_____________
Code for TallyGenerator
July 11, 2006 at 8:14 pm
I believe i have been looing at this computer for way to long..
was call the wrong pro
thanks
erik
Dam again!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply