UPDATE DE TABELA INFORMANDO CAMPO DE OUTRA TABELA
Bom Dia Pessoal,
Estou precisando da ajuda de vocês para montar um script.
TABELA1 - CAMPO1 - CAMPO2
TABELA2 - CAMPO2 - CAMPO3
Estou precisando informar o CAMPO1.TABELA1 onde tem que pegar CAMPO2.TABELA1 = CAMPO2.TABELA2 e fazer um UPDATE no CAMPO3
Alguém pode me ajudar?
Agradeço desde ja, atenciosamente
Estou precisando da ajuda de vocês para montar um script.
TABELA1 - CAMPO1 - CAMPO2
TABELA2 - CAMPO2 - CAMPO3
Estou precisando informar o CAMPO1.TABELA1 onde tem que pegar CAMPO2.TABELA1 = CAMPO2.TABELA2 e fazer um UPDATE no CAMPO3
Alguém pode me ajudar?
Agradeço desde ja, atenciosamente
Junio Neves
Curtidas 0
Melhor post
Jothaz
17/07/2015
UPDATE T2 SET T2.CAMPO3 = 'VALOR-A-SER-GRAVADO' FROM TABELA2 T2 JOIN TABELA1 T1 ON T1.CAMPO2 = T2.CAMPO2 WHERE T1.CAMPO1 = 'SUA-CONDIÇÃO'
GOSTEI 1
Mais Respostas
Junio Neves
17/07/2015
Muitíssimo obrigado
GOSTEI 0