Quantcast
Channel: WinDev Forum
Viewing all articles
Browse latest Browse all 1914

Help with SQL query - HFCS

$
0
0
Hi
I have to find barcode records which are not linked to a stockcode so I have the following query
SELECT STKPLU.plu
FROM STKPLU 
WHERE NOT EXISTS (
SELECT * FROM stkmast m
join stkplu p on (p.stkm_linkid = m.sysid)
)
This query returns 0 records. The STKPLU file contains 16,335 records which is also what I get if I remove the NOT. If I run the sub-query on its own I get 16,031 records. The difference between the 2 is what I would expect my query to return.

What am i missing?

Thanks

David

Viewing all articles
Browse latest Browse all 1914

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>