var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: SQL, Two views into one
I have two views in SQL server that work great in summarizing data from two separate groups of tables in my database.
View1 has fields ID, RInv, RAmount, RDate, RAmtPaid
View2 has fields ID, CInv, CAmount, CDate, CAmtPaid
The correspondinmg fields are of the same data type and are linked by the ID fields.
What I would like is to get all of the records into a new view for a single ID value in the following format,
View3 has fields ID, Invoice, Amount, Date, AmtPaid
For example if View1 has 2 records for ID=10 and View2 has 1 records for ID=10 then view3 should have 3 records for ID=10.
First of all is this possible, secondly if so, how can I get it done.
Re: SQL, Two views into one
If I understand your problem correctly, simple "union all" should help
create view ....
select ID, RInv, RAmount, RDate, RAmtPaid from View1
select ID, CInv, CAmount, CDate, CAmtPaid from View2
Thanks, I'll look into Unions.