I have 3 Tables. One table is invoicing, the other table is Products (contains what products make parent product), the last table is manufacturing (how long it takes to make each product). What I would like to do is have a statement that looks at the product code in the invoice table, then look at the invoice date on that row. Now use that product code to look at the products table, return what products are used to make the invoice product, then look at the date from invoice table, take the products returned and look at the manufacturing table, look for when the product was last made closest to the invoice row date and return the time take for each product that make up that invoiced product from the manufacturing tables.
Is this possible through SQL please? If someone could help with a demo script, I can work it through from there. If it is unclear with the above, can someone please let me know and I will try to explain further.