Insert information in temporary tables as follows:
SELECT * INTO #AR_TABLA_TEMP_1 FROM PERSONAS
I have to do the same but with a query that has the statement UNION
SELECT *
FROM AR_SALDOS_TOTALES_CVEN
UNION
SELECT 'TOTAL' AS TERRITORIAL,
SUM(ENEM_18) AS ENEM_18,
SUM(FEBM_18) AS FEBM_18,
SUM(MARM_18) AS MARM_18,
SUM(ABRM_18) AS ABRM_18,
SUM(MAYM_18) AS MAYM_18,
SUM(JUNM_18) AS JUNM_18,
SUM(JULM_18) AS JULM_18,
SUM(AGOM_18) AS AGOM_18,
SUM(SEPM_18) AS SEPM_18,
SUM(OCTM_18) AS OCTM_18,
SUM(NOVM_18) AS NOVM_18,
SUM(DICM_18) AS DICM_18
FROM AR_SALDOS_TOTALES_CVEN
Is this possible? and if it is what would be the correct structure?