In a stored procedure I'm trying to conditionally update a field (like the 2nd line in the SQL statement below)
UPDATE [some_stuff] SET
last_update = CASE WHEN val = @NewVal THEN last_update ELSE GETDATE() END,
val = @NewVal
...but for a text/ntext field. What's the most efficient way to go about doing that? Does it have to be a separate UPDATETEXT statement? And do I have to do an extra SELECT first?