I have code that runs in c#, what this code does:
Loop through a list of users and update the rows in a table.
UPDATE CustomerUser
SET
LoginName = @LoginName,
UserName = @UserName,
IsActive = @IsActive,
IsDeleted = @IsDeleted,
DeletedDate = @DeletedDate,
Modified = CURRENT_TIMESTAMP()
WHERE ID = @CustomerUserID;
in the c# code, it then does some concat'ing to the LoginName and userName columns.
I would like to replace that slow C# process with a SQL Statement that does something like what I have below. I know enough about SQL to think what I am asking might completely crazy, but never know till you ask.
UPDATE CustomerUser
SET
LoginName = select concat( login,uniqueid) from CustomerUser where id **this would be an ID that is in the IN() of parent query**
UserName = @UserName,
IsActive = @IsActive,
IsDeleted = @IsDeleted,
DeletedDate = @DeletedDate,
Modified = CURRENT_TIMESTAMP()
WHERE ID **IN(1,2,3,4, etc...)**;