UPDATE trgt
SET trgt.User = dbo.ScrambleEmail ( @Mode, @Key, trgt.[User] )
FROM [company].[User_Group] trgt
I'm a little confused about this update statement. I understand that it is calling an existing function during the update statement but it's a little different from other update statements. Normally an update statement ends with "where" however this update statement ends with "from". Furthermore "trgt" seems to replace the table name instead