General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
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
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only