Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Still Having Trouble With This Query
Message
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Miscellaneous
Thread ID:
01402654
Message ID:
01402701
Views:
42
You're welcome

>Thanks Sergey!
>
>
>>Try
>>
>>SELECT  p.PartNo, i.SerialNo AS Serial, i.PurchaseOrder, 
>>                      p.Description, u.FullName, 
>>		      w.Caption AS Warehouse, w.WarehouseCode, i.*
>>		FROM Inventory i
>>		JOIN Parts p ON p.PartId = i.PartId
>>		JOIN Warehouses w ON w.WarehouseId = i.WarehouseId
>>		JOIN Users u ON u.UserId = i.UserId
>>		WHERE i.WarehouseId = @WarehouseId AND i.LocationId = 0
>>			AND NOT EXISTS (SELECT 1 FROM Inventory i2 
>>				WHERE i2.WarehouseId  = i.WarehouseId  
>>					AND i2.PartId  = i.PartId 
>>					AND i2.LocationId  <> 0)
>>		ORDER BY p.PartNo, i.SerialNo
>>
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform