I have a data modelling question. I have 2 tables: a standard Transactions table, and a Customer Table.
The transaction table looks like:
Customer ID | Transaction Date
123 | 01-01-2015
123 | 15-02-2015
123 | 24-04-2015
The Customer Table looks like this: (where the data is updated on a monthly basis for the beginning of the month. The CustomerID can be reused, hence why for April 2015 the Customer ID 123 has been changed to Samsung).
Customer ID | Customer Name | Date
123 | CocaCola | 01-01-2015
123 | CocaCola | 01-02-2015
123 | CocaCola | 01-03-2015
123 | Samsung | 01-04-2015
123 | Samsung | 01-05-2015
What is the best way of mapping this Customer data into the Transaction table, so I can get something like: