1
When executing the update statement below is occurring the following error. What can be?
Msg 116, Level 16, State 1, Line 3 Only an expression can be specified in the selection list when the subconsultation is not entered with EXISTS
UPDATE EstoqueTarefa
SET EstTarTitulo = (SELECT CONCAT(EstTarTitulo, '-' ,DATENAME(MONTH,getdate())),'-',DATEPART(YEAR,getdate()))
where EstTarID = 246
You want to concatenate
EstTarTitulo + - + Mês + - + Ano
? I think there’s an extra parenthesis aftergetdate()
, that should be at the end.– Zulian