Problems with Insert( simple query - can't think something ) I have 2 tables, Tblservicedesk and Tblservicedesk_temp

Columns:


CodServiceDesk 
ID_Solicitacao
Solicitante
Departamento
Tecnico
Grupo
Status
Prioridade
Data_Abertura_Chamado
Data_Vencimento_Chamado
Data_Conclusao_Chamado
Nota
Comentario_Atendimento
data_criacao_registro
FlagEmailNota
FlagEmailSLA
FlagEmailFechado
data_resolved


I need to update the Tblservicedesk, with values of these 3 columns (FlagEmailNota, FlagEmailSLA, FlagEmailFechado ) from the Tblservicedesk_temp table.

All of this 3 columns is NULL in Tblservicedesk, and we have values in some columns in Tblservicedesk_temp.

I need to use ID_SOLICITAÇÃO as PK.
Assuming both Tblservicedesk &amp; Tblservicedesk_temp having same columns. You can write update statement to update the three columns (FlagEmailNota, FlagEmailSLA, FlagEmailFechado ).

UPDATE tsd
SET
   tsd.FlagEmailNota = tsdt.FlagEmailNota , 
   tsd.FlagEmailSLA = tsdt.FlagEmailSLA, 
   tsd.FlagEmailFechado = tsdt.FlagEmailFechado
FROM 
   Tblservicedesk AS tsd
JOIN
  Tblservicedesk_temp AS tsdt ON tsd.ID_SOLICITAÇÃO = tsdt.ID_SOLICITAÇÃO 


Since I don't have enough reputation to comment hence i'm posting this as an answer, if this is not what you are looking for please let me know.