Hi.
I have and tblOrders table with the usual PK/FK relation to tblOrderDetails table. ProductID in tblOrderDetails table is FK to tblProducts table where details about which warehouse the product is located.
I need to create a query that return those records where an order is shipped from more than one warehouse.
It may involve creating a subquery using IN or EXISTS keywords, but I can't get my head around it. Help me please Dr. SQL-guru.
(ProductID is PK in tblProducts)
I have and tblOrders table with the usual PK/FK relation to tblOrderDetails table. ProductID in tblOrderDetails table is FK to tblProducts table where details about which warehouse the product is located.
I need to create a query that return those records where an order is shipped from more than one warehouse.
It may involve creating a subquery using IN or EXISTS keywords, but I can't get my head around it. Help me please Dr. SQL-guru.
(ProductID is PK in tblProducts)
Last edited: