Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
NOT in SQL
Message
De
26/07/2001 05:24:40
 
 
À
26/07/2001 01:34:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Titre:
Divers
Thread ID:
00535535
Message ID:
00535571
Vues:
11
Hi John,

>>Select s.usize, s.uname, s.ppu, s.gcode, s.ccode, s.Ino, s.BCode, s.IName, .loccode, s.CPU, s.qty, (s.CPU * s.qty) AS TotalCost ;
FROM tempStock1 s ;
WHERE NOT s.Ino IN (SELECT Ino FROM csrLPQty) and ;
NOT (s.loccode in (select loccode from csrLPQty))) ;
UNION ;
SELECT usize, uname, ppu, gcode, ccode, Ino, BCode, IName, loccode, CPU, qty, (CPU * qty) AS TotalCost ;
FROM csrLPQty ;
into cursor tempStock<<

This will give you the result where s.ino and s.loccode each in isolation to each other do not have correponding records in csrLPQty

Try using the criteria

WHERE NOT EXISTS (SELECT * FROM csrLPQty B WHERE S.ino = b.ino AND s.loccode = b.loccode)

Simon Horne
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform