I got 2 DB (identical) on the same server.
I gat the same query, if i run the quey on the first da the result seem to be true but in the ither one it looks to be false!!!
Why!!
This is the query!!
SELECT DISTINCT
TMP1.MATNR , 1
FROM #TMP_PROD TMP1
WHERE NOT EXISTS (SELECT * FROM #TMP_COMP TMP2 ,
#TMP_PROD TMP3
WHERE TMP2.AUFNR = TMP1.AUFNR and
TMP3.MATNR = TMP2.COMPNR)
In my opinion the problem is in the NOT EXIXT Clause!!!
Is there any setting or some other thing that can make it!!
Thanks Alessandro