I am still fairly green at SQL so forgive me but I need help writing a Select statement. I currently have a few tables like this.
ID | Date 2 4-16-18 4 4-16-17 Table 2 ID | Name | Data 1 Blue H 2 Blue HM 3 Green H 4 Green HM 5 Red H
I am joining at ID. You can see in Table 2 that some items have the same name. What I need to do is take the data from Table 1 say ID 2 and do what Excel would call a Merge based upon name so that the data for ID 2 can be added as another column for ID 1. I know excel has the capability to do this. I think SQL has a merge feature but (correct me if I'm wrong) I think that actually changes data. I am just trying to run a Select statement.
If anyone has any advice on what to do that would be appreciated.
These are the result I am trying to produce with the Select statement. I now realize I forgot to mention the entries labeled HW will be filtered out once their data is merged.
ID | Name | Data | Date 1 Blue H 4-16-18 3 Green H 4-16-17 5 Red H Null