Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to Pull This Data
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01401995
Message ID:
01402000
Vues:
52
SELECT *
  FROM Inventory
  WHERE PartId IN (SELECT PartId FROM Inventory WHERE WarehouseId = 10 AND PartId = 8545)
>
>
>WarehouseId WarehouseCode
>----------- -------------
>8           DFG
>9           CBD
>10          SFS
>11          SDE 
>
>
>InventoryId PartId      WarehouseId LocationId  ActionDate
>----------- ----------- ----------- ----------- -----------------------
>8549        8545        10          132         2009-05-26 09:58:21.397
>10686       8545        10          130         2009-05-26 09:53:54.817
>10685       8545        9           125         2009-05-26 09:53:09.603
>10525       8545        8           11          2009-05-25 08:17:01.202
>
>
>
>I need to retrieve the history of a part. If I were running the application at warehouse 10 and I wanted a history of part 8545, how do I also pull inventory records 10685 and 10525?
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform