1
Good morning, I’m having a hard time updating SQL Server. I have the following situation:
Table 1
ID
Codigo
Table 2
ID
Nome
And I have an excel file like this:
Excel
Codigo
Nome
I need to update the column Name of Table 2, with the data of excel, what would be querry in that situation?
I tried that:
SELECT *
FROM Tabela2 F
FULL JOIN Tabela1 M ON F.id = M.codigo
What is the relationship between
Tabela1
andTabela2
?– Roberto de Campos
Hi and welcome, have you tried anything? at least show some effort.
– Ilyes
The ID column, I tried this select * from Table2 F full Join Table1 M on F.id = M.codigo But showed overflow error
– Gabriel Oliveira Almeida
Please show sample data and expected results, and you are trying to update the table of an excel file or what?
– Ilyes
Gabriel, to access/import data from Excel spreadsheet I suggest reading the article "Bulk data import". So you can access/import directly, without manual activity. https://portosql.wordpress.com/2018/08/12/importacao-dados-mass/
– José Diz
(1) The relationship between the tables
Tabela 1
andTabela 2
occurs by ID columns? (2) What is the file extension that contains the spreadsheet: xls or xlsx?– José Diz