03-26-2014 09:05 AM
Hi.. i have a query on how to create a new dataset from 3 different existing datasets by taking values from existing dataset1 then multiply the obs with dataset2 then divide the same obs with dataset3. The data in all 3 existing datasets have same variable names.
03-26-2014 09:34 AM
Best to provide actual data examples, but my interpretation is something like (you need a linking variable):
create table WANT as
select COALESCE(A.COMMON_VAR,B.COMMON_VAR,C.COMMON_VAR) as COMMON_VAR,
(A.VAL * B.VAL) / C.VAL as RESULT
from DATASET1 A
full join DATASET2 B
full join DATASET3 C
03-26-2014 09:51 AM
hard to understnd the requirement, Its always easier to understand a problem if inputs and desired output data examples are provided.