Greetings to all, friends. I have the following problem:
I just assumed the administration of an old system which manages 4 databases (different names, identical structure) but the only common table in structure and data is that of Users.
The system, as they inform me, has a task that takes the table of one of the databases as the main one and replicates it in the other 3: S, this task is failing and the system is down ...: $
While I must look at what part of this horrible code is this task, I urge you to replicate the tables manually via SQL Server .
I tried this:
UPDATE [BDdestino].[dbo].[Usuarios]
SET
[DBdestino].[dbo].[Usuarios].activo = [Usuarios].activo,
[DBdestino].[dbo].[Usuarios].apellido = [Usuarios].apellido,
[DBdestino].[dbo].[Usuarios].cargo = [Usuarios].cargo,
[DBdestino].[dbo].[Usuarios].correo = [Usuarios].correo,
[DBdestino].[dbo].[Usuarios].nombre = [Usuarios].nombre,
[DBdestino].[dbo].[Usuarios].password = [Usuarios].password,
[DBdestino].[dbo].[Usuarios].usuario_id = [Usuarios].usuario_id
FROM [DBorigen].[dbo].[Usuarios]
But I get this error:
Msg 1013, Level 16, State 1, Line 2 Objects "DBdestino.dbo.Users" and "DBorigen.dbo.Users" in the FROM clause They have the same names exposed. Use correlation names for distinguish them.