I wrestled with this query this weekend without much success. Any guidance would be greatly appreciated.
id | name
1 | spec name one
2 | spec name two
3 | spec name three
id | list_item_id | inventory_item_id | value
1 | 2 | 181 | 100 gal
I need two different queries.
Query 1: return the entire table_list (all entries) Joined with table_specs ON table_specs.list_item_id = table_list.id AND table_specs.inventory_item_id = (whatever inventory item I'm looking at). This would give me a complete list of all possible specs but with some having empty values.
Query 2: return ONLY the table_list items that have corresponding Joined values in the table_specs table for a certain inventory item.
I've tried INNER JOIN, and several variations of OUTER's, at this point I've confused myself greatly.... sigh. Any guidance would be greatly appreciated.
Thanks in advance for any guidance or suggestions!