Hi,
I am a newbie and this problem (which might look simple) is giving me a headache for days now:
I am building a query that shows the content of Table 1 (contains a draft bill of materials for a store remodel so it has store_no, item_ID and Quantity). The problem is that I need to include the content of one field from a second table (contains additional specs based on the item so it has Item_ID and spec_detail) based on a condition that has to be met on a third table that is linked at the store level, not at the item level (contains store information including store_no and a field that shows if the store is 24hrs or not).
For instance, one of the items in the bill of materials is an open refrigerator. The refrigerator would need night curtains only if the store that is requesting it is not 24 hrs. If 24hrs is “Y” then I don't need to add the curtains spec.
I have tried outer joins between my tables 1 and 2. I have also tried inner join between my table 1 (bill of materials) and table 3 (store info) and then a left join with my second table. I am running out of ideas. Please help!!
Thanks!
I am a newbie and this problem (which might look simple) is giving me a headache for days now:
I am building a query that shows the content of Table 1 (contains a draft bill of materials for a store remodel so it has store_no, item_ID and Quantity). The problem is that I need to include the content of one field from a second table (contains additional specs based on the item so it has Item_ID and spec_detail) based on a condition that has to be met on a third table that is linked at the store level, not at the item level (contains store information including store_no and a field that shows if the store is 24hrs or not).
For instance, one of the items in the bill of materials is an open refrigerator. The refrigerator would need night curtains only if the store that is requesting it is not 24 hrs. If 24hrs is “Y” then I don't need to add the curtains spec.
I have tried outer joins between my tables 1 and 2. I have also tried inner join between my table 1 (bill of materials) and table 3 (store info) and then a left join with my second table. I am running out of ideas. Please help!!
Thanks!