both the VDM have exact same column names
Key,Amount,Period1,Version
when I try to do Union of these two VDM :
SELECT Key,Amount,Period1,Version FROM AUM_Plan4
union
SELECT Key,Amount,Period1,Version FROM AUM_Act4
I get an error message stating schemas are different.
Unable to complete query, attempting to union two datasets that have different underlying schemas.
Left: schema(Key::varchar, Amount::double, Period1::union<double, varchar>, version::varchar),
Right: schema(Key::varchar, Amount::double, Period1::varchar, version::varchar
but the schemas are identical, I am not sure what is different here. Can anyone help me here.
Thanks
A.Dinesh
@Dinesh, it looks like there are 2 underlying physical datasets (PDS) that this union references:
@dinesh.AUM_Prdct_Plan_Data: in this dataset Period is a Union type (if you look at the dataset you’ll see Abc/#.# next to the column name)
@dinesh.AUM_Prdct_Data: in this dataset Period is a VARCHAR type (if you look at the dataset you’ll see Abc next to the column name)
So they can’t be unioned. Try creating a VDS where you convert Period from @dinesh.AUM_Prdct_Plan_Data to a VARCHAR and see if you can use that in the union