Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Selecting records that don't match
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
01237949
Message ID:
01237969
Vues:
13
delete from Products p1 where p1.Discontinued = .t. and ;
P1.ProductId not in (SELECT DISTINCT PRODUCT.ProductId as ProdID ;
	FROM PRODUCT INNER JOIN ProdSize ;
	ON PRODUCT.ProductId = ProdSize.PRODUCT ;
	WHERE PRODUCT.discontinued = .T. ;
	AND (ProdSize.onorder != 0 ;
	or ProdSize.stock != 0)
>>>I have a parent tale called products. One of the fields is discontinued.
>>>
>>>I have a child table, that links to the parent products via the productid key field. The child table has both an onorder and a stock field, to store any items that are onorder or have stock in inventory.
>>>
>>>There is a one to many relationship with the child.
>>>
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform