|
|
Archives of the TeradataForum
Message Posted: Thu, 13 Sep 2012 @ 13:10:30 GMT
Subj: | | Re: Error - 3504 :- Selected non-aggregate values must be part of the associated group. |
|
From: | | Frydryszak, Marek |
Is it really error from this query ?
It works ...
SELECT
NBR (INTEGER),
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))
FROM
( sel 1 nbr, timestamp '2012-03-04 12:34:56.000000' endTS, 'X' loc_cd ) a
GROUP BY 1,2,3;
| |