Cita:  
					Iniciado por Libras  
  podrias poner el codigo que esta antes de esa ejecucion y el que esta despues, hay que saber exactamente en que parte esta el error......
    
Claro, 
En resumen  lo que esta antes es... :    
Código SQL:
Ver original- INSERT INTO [192.168.20.255].DB_.dbo.Agr_GestionUsuarios 
-                              ( Id_Mes, Id_LineaNegocio, Id_Cartera, Id_Gestor,codigo_llamada, Id_GrupoHora,Id_Tipo_Estado,Id_estadoGestion,Id_SubEstado,codigo_ficha,id_estaripley, id_subestaprose, 
-                             fecha_gestion,fecha_carga,flag_mejor_gestion,cant_clientes,cant_llamadas,cant_ventas,cant_ventas_val,monto, tiempo_hablado, tiempo_mejorllamada) 
-                             SELECT Id_Mes, Id_LineaNegocio, Id_Cartera, Id_Gestor,codigo_llamada, Id_GrupoHora,Id_Tipo_Estado,Id_estadoGestion,Id_SubEstado,codigo_ficha,id_estaripley, id_subestaprose, 
-                             fecha_gestion,fecha_carga,flag_mejor_gestion,cant_clientes,cant_llamadas,cant_ventas,cant_ventas_val,monto,tiempo_hablado, tiempo_hablado_llamada FROM UsuariosUnicos_Stage   
-   
-   
-   
-         UPDATE A SET A.Id_Estadogestion=T.Id_Estadogestion 
-             FROM UsuariosUnicos_Stage A 
-                 INNER JOIN [192.168.20.255].DB_.dbo.Lk_Estadogestion T ON(T.Cod_Estadogestion=A.codigo_final   ) 
-                 AND t.Id_Lineanegocio = 26 
-          
-             UPDATE A SET A.Id_Subestado=T.Id_Subestado 
-             FROM  UsuariosUnicos_Stage A   
-                 INNER JOIN [192.168.20.255].DB_.dbo.Lk_Subestado T ON(T.Cod_Subestado=A.codigo_final_cross  AND T.id_Estadogestion = A.Id_EstadoGestion) 
Luego viene esto  que genera error :   
Código SQL:
Ver original- UPDATE T SET existe=1 
-             FROM UsuariosUnicos_Stage  T  
-                 INNER JOIN  
-                 (SELECT Id_Cartera, Id_Gestor, Fecha_Gestion  
-                 FROM [192.168.20.255].DB_.dbo.Agr_GestionUsuarios 
-                 GROUP BY Id_Cartera, Id_Gestor, Fecha_Gestion 
-                 ) AS B ON T.Id_Cartera=B.Id_Cartera AND T.Id_Gestor = B.Id_Gestor AND T.Fecha_Gestion = B.Fecha_Gestion 
Lo que viene esta comentado, (lo hice para detectar donde cae).
Esto:    
Código SQL:
Ver original- UPDATE T SET  T.Fecha_carga = B.fecha_carga, cant_clientes = B.cant_clientes, cant_llamadas = B.cant_llamadas, cant_ventas =B.cant_ventas, cant_ventas_val = B.cant_ventas_val ,  
-                     monto = B.monto 
-                      FROM [192.168.20.255].DB_.dbo.Agr_GestionUsuarios  T 
-                         INNER JOIN 
-                             (SELECT Id_Cartera, Id_Gestor,Fecha_Gestion,fecha_carga, cant_clientes,cant_llamadas, cant_ventas, cant_ventas_val,monto, tiempo_hablado 
-                             FROM UsuariosUnicos_Stage  H  
-                             WHERE existe = 1 
-                             ) AS B ON  T.Id_Cartera=B.Id_Cartera AND T.Id_Gestor = B.Id_Gestor AND T.fecha_Gestion =B.fecha_Gestion 
Y otras cosas más..  
Cabe resaltar que  todo eso funcionaba.. tal y como lo muestro...  Como dije es extraño antes :/