|
|
Archives of the TeradataForum
Message Posted: Wed, 12 Sep 2012 @ 16:17:39 GMT
Subj: | | Re: Error - 3504 :- Selected non-aggregate values must be part of the associated group. |
|
From: | | Usenko, Yuriy |
SEL
NBR
, LOCENDTS
, LOC_CD
FROM
(
SELECT
NBR (INTEGER) as NBR,
CAST ( SUBSTR ( CAST ( ENDTS AS CHAR(26) ), 1, 10)
|| '-' || SUBSTR ( CAST
( ENDTS AS CHAR(26) ), 12, 2)
|| '.' || SUBSTR ( CAST
( ENDTS AS CHAR(26) ), 15, 2)
|| '.' || SUBSTR ( CAST
( ENDTS AS CHAR(26) ), 18, 9)
AS CHAR(26)) AS LOCENDTS,
LOC_CD (CHAR(01)) as LOC_CD
) LOCN
GROUP BY 1,2,3;
| |