Question: Merge two or more datasets

Let say that you have two datasets:

z1 := GetCSV("");
z2 := GetCSV("");

              dataset1                                                            dataset2

date                    stock1    stock2                  date                  stock1       stock2
2012-01-05           67         56                       2012-03-01        34              98
.........                  ....          ....                     ......                  .....            ......

What would the best way be to merge them into one dataset? I mean I can do it in a primitive
way and simply fill out one matrix with "" (missing observation) so the two matrices have the same
dimensions and then simply merge them. However, it might be problematic if the dates are different
ie different bank holidays (usa bank holidays might be different than germany) or if the last date in two 
data files are different.

I would like a more sofisticated automated way where the date of each observations are checked
so they are equal and then a new column is created where the new data is stored on that partical row.
One matrix also needs to be fill out with "" (missing observation) so the two matrices have the same
dimensions. Such process might be resource intensive but I feel it is needed to ensure data integrety.

Please Wait...