|
Archives of the TeradataForumMessage Posted: Thu, 12 Jun 2003 @ 17:36:18 GMT
Hi Peter: I am betting that the reason your NOT IN doesn't work is due to the data and the way you wrote the request. It would appear that one of your vendor_id columns contains a NULL. If you get a NULL in the subquery, the comparison result is UNKNOWN on every row that is not one of the other values in the subquery. Therefore, the suggested NOT EXISTS will work well and probably faster than a NOT IN. To make the NOT IN work, you must add to your WHERE clause: VENDOR_ID IS NOT NULL. Once you do this, the NOT IN will return the correct result too. Regards, Mike
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||