0
I have 3 tables with the same columns but with different records of different periods and no Pks.
I’d like to unify them into one view
to analyze the data, have some command in SQL that helps me in this
I’m pretty new to SQL
tried the code:
create view vwEstudantes
select * FROM dbo.ESTUDANTES_2012;
select * FROM dbo.ESTUDANTES_2015_1;
select * FROM dbo.ESTUDANTES_2015_2;
From what I can understand what you want is
UNION
and notJOIN
. Try:create view vwEstudantes AS
select * FROM dbo.ESTUDANTES_2012;
UNION ALL
select * FROM dbo.ESTUDANTES_2015_1;
UNION ALL
select * FROM dbo.ESTUDANTES_2015_2;
.– anonimo
Thank you very much was that, I only had to take the ; that worked, saved my night!
– Martin Klein