I have the following questions:
SELECT *
FROM #TABLE_AR_5
SELECT *
FROM #TABLE_AR_6
This is my result:
I need the information to be in a single table, I look for this result:
You apply the inner JOIN statement to the TERRITORIAL field Example:
SELECT TABLE_AR_5.TERRITORIAL,TABLE_AR_5.ENE,TABLE_AR_6.FEB
FROM TABLE_AR_5
INNER JOIN TABLE_AR_6 ON TABLE_AR_6.TERRITORIAL=TABLE_AR_5.TERRITORIAL
Another option would be with UNION