I am trying to do a fairly complex (for me) query that will grab a Description field from a Main Table and then append it with titles and values from related Look-Up-Tables. Not all records have records in the Look-up tables. I'll pose further questions as subsequent questions as I go along, but to start my issue is that only those records with values in all the tables show up.
http://sqlfiddle.com/#!9/09047/13
- (null)
- This is Record 2 Text
Color:
Red
Fruit:
Apple - (null)
If I use Concat_WS I get all records but my 'label' in the concat disappears:
http://sqlfiddle.com/#!9/09047/16
- This is Record 1 Text
Blue - This is Record 2 Text
Red
Apple - This is Record 3 Text
Grape
So my first step is to get all the record descriptions regardless of how many Look-up-Tables they exist in and to get the Names/Labels displaying.