I have two tables that I’m trying to show a flat view from. I have table A with a Product Code and Table B with that Code and a column of Status codes (Done, NotDone, InProcess). That status has a date/time associated with its product code. When I join on the code, I get all the codes regardless if they have a datetime or not. How do I display Product Code, DoneDateTime, InProcessDateTime, NotDoneDateTime in their own columns as a single flat view assuming they datetime code exists?
Table A
Prod1
Prod2
Prod3
TableB
Product 1 DoneDate
Product 1 NotDoneDate
Product 2 DoneDate
Product 2 NotDoneDate…
Desired View
Product Code DoneDate NotDoneDate
1 1/1/11 1/10/11
2 1/12/11