Problem Note 38759: An error can occur when you run a query against a DBMS and the query contains a column that is renamed and that is then used in a GROUP BY clause
When you run a query against a DBMS and the query contains a column that is renamed and that is subsequently used in a GROUP BY clause, an error can occur. The exact error message varies, depending on the DBMS, but it is to the effect that the column does not exist.
This problem occurs when the SAS® System generates an inline view for the renaming of the column, but outside of the view, it still uses the original name. As a result, the DBMS issues the error.
Workarounds for this problem are as follows:
- Rename the column in a subsequent step.
- Use a positional number for the column in the GROUP BY clause. For example, if the renamed column is the first variable in the SELECT clause, use the clause group by 1 in your query.
Operating System and Release Information
SAS System | Base SAS | z/OS | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft® Windows® for 64-Bit Itanium-based Systems | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Datacenter 64-bit Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise 64-bit Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows XP 64-bit Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows 2000 Advanced Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Datacenter Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Enterprise Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows Server 2003 Standard Edition | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Microsoft Windows XP Professional | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Windows Vista | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
64-bit Enabled AIX | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
64-bit Enabled HP-UX | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
64-bit Enabled Solaris | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
HP-UX IPF | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Linux | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Linux on Itanium | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
OpenVMS Alpha | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Solaris for x64 | 9.1 TS1M3 SP4 | 9.3 TS1M0 |
Tru64 UNIX | 9.1 TS1M3 SP4 | 9.3 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: | medium |
Date Modified: | 2010-06-09 10:26:08 |
Date Created: | 2010-02-16 14:14:52 |