|
Archives of the TeradataForumMessage Posted: Mon, 09 Feb 2004 @ 23:09:16 GMT
<-- Anonymously Posted: Monday, February 09, 2004 17:29 --> Hello, The EXISTS clause in Teradata has an oddity that I am facing. Whenever there are no rows being returned from the subselect under EXISTS, Teradata,UDB,Oracle etc. would evaluate the clause to be FALSE. But if there are ONLY AGGREGATE functions in the subselect, UDB/Oracle will return TRUE and so do other database servers. TD does not do this example: select * from n1 where EXISTS (select max(c1) from n1 where c1<0) and lets say all the values in c1 are > 0 Then Oracle/UDB will return TRUE, but TD will return FALSE for this. The interesting thing is that if we issue something like: select * from n1 where EXISTS (select max(c1) from n1 where c1<0 UNION select max(c1) from n1 where c1<0 ) to TD and Oracle/UDB they have the same behavior then. Meaning, EXISTS returns TRUE. Is this a bug? Thanks
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||