Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Partial Shipment Check Qty left!
Message
De
10/12/1999 23:39:47
 
 
À
10/12/1999 23:21:37
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00302169
Message ID:
00302173
Vues:
28
>Justok...
>
>Orders (Order_ID, ....)
> |
> /|\
>OrdItems (Order_ID, ITEM, QTY, ....)
> |
> /|\
>Shipment (SHIP_NO, Order_ID, ITEM, SHIPQTY, ....)
>
>-----
>Maybe better would be:
>
>OrdItems(OrdIt_ID, Order_ID, ITEM, QTY)
>
>Shipment(SHIP_NO, OrdIt_ID ...) to tie the shipment(s) to the OrdItems table instead of to Orders. Then each line item has one or more shipments easily tracked.




Ok.. So, can I do SQL sth like:

Creaet SQL VIEW OrdersLeftQTY As ;
Select Orditems.Order_ID, Orditems.ITEM, Orditems.QTY - SUM(Shipment.SHIPQTY) as LeftQTY... ;
From Orditems Inner Join Shipment On Orditems.OrdIt_ID=Shipment.OrdIt_ID ;
Where OrdItems.Order_ID = ?Thisform.CurOrder_ID ;
Group By Shipment.OrdIt_ID

Then, I'd like to known the different btw :
Select .... ;
Group by Shipment.Order_ID, Shipment.ITEM

and
Select .... ;
Group by Shipment.OrdIT_ID

o_0'

Or Using SUM, CALCULATE cmd to sum up value and subtract from Orditems.Qty?
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform