|
Archives of the TeradataForumMessage Posted: Thu, 15 Dec 2011 @ 09:36:05 GMT
Have you actually verified that the SELECT returns the number of rows you expect? For example SELECT COUNT(*) FROM (SELECT DISTINCT ....) x; Your CASE statement is also suspect: If T1.ACIN1 is NULL then the ELSE condition will set the result to ACIN3; otherwise ACIN1 = ACIN1 so the result is ACIN2. It will never be ACIN4 - so I doubt it is what you intended.
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||