ALTER PROCEDURE [dbo].[EditTable]
SET passwordHash = CASE WHEN @passwordHash = NULL THEN passwordHash ELSE @passwordHash END
I want to keep the old password if the user leaves the password field blank, otherwise store the new password.
I have also tried "IS NOT NULL" instead of "= NULL", but without success. I've tried to send in an empty string and a DBNull value but it never keeps the old password.
View Complete Post