Archives of the TeradataForum
Message Posted: Wed, 23 Nov 2011 @ 08:27:12 GMT
<-- Anonymously Posted: Wednesday, November 23, 2011 03:15 -->
We have recently migrated to Teradata 13 and as a result of which some of our codes are failing due to changes in syntax.
I recently encountered a piece of code that was failing with the error - 3504: Selected non-aggregate values must be part of the associated group. However, the code ran fine with the earlier?version of TD.
When I looked into the code I found that there were non-aggregated columns being selected in the sql which was causing the sql to fail with the new TD version.
select a, b, c from table group by a,b
I?fixed the code by changing the group by clause to include the column c and it worked fine.
select a, b, c from table group by a,b,c
Can anyone please explain as to how the sql would have behaved prior to the change? Since, no aggregate functions were being used on column c, would the sql still have grouped by on a, b and c ? Some examples would work just perfect.
Looking forward for your clarifications.
|Copyright 2016 - All Rights Reserved|
|Last Modified: 27 Dec 2016|