Problem Note 19170: Errors issued when integer references for column is used in a PROC SQL
GROUP BY statement
You will receive the following error messages when a integer for the
column position on the SELECT clause is used in the PROC SQL GROUP BY
clause:
ERROR: GROUP BY clause contains a summary function, which is not
allowed.
ERROR: Summary functions are retricted to the SELECT and HAVING
clauses only.
The errors may be generated incorrectly if none of the columns
referenced in the GROUP BY clause contain a summary function.
An example of a query which generates this error follows:
proc sql;
create table new as
select
table1.col1,
table4.col2,
table5.col3,
table2.col4,
table3.col5,
(table3.col6) as newcol6,
sum(table0.col7) as col7,
sum(table0.col8) as col8
from table0
inner join table1
on table0.key1=table1.key1
inner join table2
on table0.key2=table2.key2
inner join table3
on table0.key3=table3.key3
inner join table4
on table0.key4=table4.key4
inner join table5
on table0.key5=table5.key5
group by 1, 2, 3, 4, 5, 6;
quit;
Select the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
SAS System | Base SAS | Microsoft Windows NT Workstation | 9.1 TS1M3 | |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Server | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows 2000 Professional | 9.1 TS1M3 | 9.2 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M3 | 9.2 TS1M0 |
z/OS | 9.1 TS1M3 | 9.2 TS1M0 |
HP-UX IPF | 9.1 TS1M3 | 9.2 TS1M0 |
Linux | 9.1 TS1M3 | 9.2 TS1M0 |
Linux on Itanium | 9.1 TS1M3 | 9.2 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M3 | 9.2 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M3 | 9.2 TS1M0 |
OpenVMS Alpha | 9.1 TS1M3 | 9.2 TS1M0 |
Tru64 UNIX | 9.1 TS1M3 | 9.2 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 | 9.2 TS1M0 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Topic: | SAS Reference ==> Procedures ==> SQL SAS Reference ==> SQL
|
Date Modified: | 2008-02-19 10:54:01 |
Date Created: | 2006-12-12 15:58:18 |