subquery question (1 Viewer)

Bob

Registered User.
Local time
Today, 04:35
Joined
Nov 15, 2009
Messages
18
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)
 
Last edited:

Guus2005

AWF VIP
Local time
Today, 05:35
Joined
Jun 26, 2007
Messages
2,641
tblOrder
tblOrderDetail
tblProduct
tblWarehouse

this involves a lot of typing if you don't have a sample database.
Please post one.
 

Users who are viewing this thread

Top Bottom