CREATE PROCEDURE [dbo].[Ins_Storico_from_Sem_KEYCLIENT]
AS 
BEGIN
-- QUESTA PROCEDURA POPOLA LE TABELLE DELLO SCHEMA STORICO DEL DATABASE KEYCLIENT DALLE TABELLE SEMESTRALI
INSERT INTO KEYCLIENT.Storico.TB_KC_CLIENTI
SELECT * FROM KEYCLIENT.Semestrale.TB_KC_CLIENTI
INSERT INTO KEYCLIENT.Storico.TB_KC_METAPORTAFOGLIO
SELECT * FROM KEYCLIENT.Semestrale.TB_KC_METAPORTAFOGLIO
INSERT INTO KEYCLIENT.Storico.TB_KEYCLIENT_METACONTRATTO
SELECT * FROM KEYCLIENT.Semestrale.TB_KEYCLIENT_METACONTRATTO
INSERT INTO KEYCLIENT.Storico.TB_KEYCLIENT_OBIETTIVO
SELECT * FROM KEYCLIENT.Semestrale.TB_KEYCLIENT_OBIETTIVO
INSERT INTO KEYCLIENT.Storico.TB_KEYCLIENT_STRATEGIA
SELECT * FROM KEYCLIENT.Semestrale.TB_KEYCLIENT_STRATEGIA
INSERT INTO KEYCLIENT.Storico.V_ANAGPCT
SELECT * FROM KEYCLIENT.Semestrale.V_ANAGPCT
END