I have a list of codes and options. A code can either have the option a, b, or c (for example):
In another table, I have these codes and options, mapped to prices
A00001 a £1
A00001 b £2
A00002 a £3
A00002 c £4
A00003 b £5
However, in the second list, if all prices for all options are the same, then the code will have just one line, with the option of 'd' indicating that all options attract the same price.
A00004 d £6
So my question is how do a write a join so that I return the correct price next to every code and option in the first list?
Thanks in advance.