Archives of the TeradataForum
Message Posted: Thu, 13 Jun 2002 @ 14:38:41 GMT
I think I've found a problem. I keep getting the following error (3569: Improper Use of an Aggregate Funcion in a Where Clause); however, the only Where statements exist in the derived tables, and I can execute the SQL with makes up the derived tables without any issues.
Before I submit an incident, can anybody spot something obvioulsy wrong with the SQL?
I've provided the DDL for the only table involved. So, along with the DML, this should be a re-creatable problem.
CREATE TABLE TableB (ColumnA CHAR(3)); SELECT TableB.* FROM TableB , ( SELECT MAX(SUBSTR(ColumnA,1,1)) || (MAX((SUBSTR(ColumnA,2,2) (INTEGER))) (FORMAT '99')) FROM TableB WHERE SUBSTR(ColumnA,1,1) = 'C' ) maxrever (ColumnA) , ( SELECT MAX(SUBSTR(ColumnA,1,1)) || (MIN((SUBSTR(ColumnA,2,2) (INTEGER))) (FORMAT '99')) FROM TableB WHERE SUBSTR(ColumnA,1,1) = 'C' ) prirever (ColumnA)
|Copyright 2016 - All Rights Reserved|
|Last Modified: 28 Jun 2020|