troubleshooting Question

Join two SQL tables and populate Date field on all records SQL Server 2008

Avatar of Saxitalis
Saxitalis asked on
Microsoft SQL ServerMicrosoft SQL Server 2008Databases
3 Comments1 Solution60 ViewsLast Modified:
Hello Experts,

I have two tables: MaterialT_1 and MaterialT_2

MaterialT_1:
Date            M1            Grp1            Grp2        Grp3
11/29/2015      10            AA            BA            CA

Material_2:
Date            M2             Grp1            Grp2        Grp3
11/29/2015      2            AA            BA            CA
11/29/2015       4            AB             BC             CC            
11/30/2015      15            AB            BC            CC      

I have joined then in a view like this:

I would like to join these two tables in a view so the results look like this:

Date               M1             M2            Grp1            Grp2        Grp3
11/29/2015      10            2            AA            BA            CA
11/29/2015      0            4            AB            BC            CC      
11/30/2015      0             15            AB            BC            CC

Does anyone know how to do this?

Thanks!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros