sql - Combine data from one table to another table at multiple level -
i have following table in sheet1.
project| resource name | line manager ---------------------------------- 2345 david peter 2345 tam peter 2345 richard peter 2358 russell adam
sheet2 has following table
project| month |revenue ----------------------- 2345 jan 10000 2345 feb 15000 2358 jan 8000 2358 feb 12000
how following result in sheet2
project| month| revenue| resource|name line manager ------------------------------------------------ 2345 jan 10000 david peter 2345 jan 10000 tam peter 2345 jan 10000 richard peter 2345 feb 15000 david peter 2345 feb 15000 tam peter 2345 feb 15000 richard peter 2358 jan 8000 russell adam 2358 feb 12000 russell adam
how about:
select s1.*, s2.* sheet1 s1 join sheet2 s2 on s2.project=s1.project
Comments
Post a Comment