0
Connection and Historico_ligacao
I have a script which copies all data from the table Ligacao
for Historico_ligacao
.
When I compare the data between the theban, the table historico_ligacao
is arranged in a different way from Ligacao
, I don’t know if this influences anything, but I would like the ordination of both to be equal.
Below is the code of Insert:
SET IDENTITY_INSERT HISTORICO_LIGACAO ON
INSERT HISTORICO_LIGACAO (CDLIGACAO,CDLOTE,CDATRIBUTOLOTE,CDCAMPANHA,CDROTA,CDCONTATO,CDTELEFONE,CDESTADOLIGACAO,DURACAO,DTINICIO,DTFINAL,NUMERO_DISCADO,TECLAS_VALIDAS,TECLAS_TODAS, timezone)
output inserted.CDLIGACAO into #temp (num)
SELECT * FROM LIGACAO WHERE CDLOTE <= @CDLOTE order by cdligacao;
SET IDENTITY_INSERT HISTORICO_LIGACAO OFF