Problem Note 67563: A column name might be listed twice in a query that is passed to the database management system (DBMS) and "column ambiguously defined" occurs
When you run a query against a DBMS, you might receive the following error:
column ambiguously defined
This issue can happen when using a LENGTH= attribute on a column in the SELECT list against a complex view. Here is an example:
PROC SQL;
SELECT Column1,
Column2 LENGTH = 20
FROM
dblib.dbview
;
QUIT;
ERROR: ORACLE prepare error: ORA-00918: column ambiguously defined
To work around the problem, you can remove the LENGTH = attribute from the column in the SELECT list.
Click the Hot Fix tab in this note to access the hot fix for this issue.
Operating System and Release Information
| SAS System | SAS/ACCESS Interface to Oracle | z/OS | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft® Windows® for x64 | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows 8 Enterprise 32-bit | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows 8 Enterprise x64 | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows 8 Pro 32-bit | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows 8 Pro x64 | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows 8.1 Pro x64 | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows 10 | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows Server 2008 | 9.4 TS1M7 | |
| Microsoft Windows Server 2008 R2 | 9.4 TS1M7 | |
| Microsoft Windows Server 2008 for x64 | 9.4 TS1M7 | |
| Microsoft Windows Server 2012 Datacenter | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows Server 2012 R2 Std | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows Server 2012 Std | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows Server 2016 | 9.4 TS1M7 | 9.4 TS1M8 |
| Microsoft Windows Server 2019 | 9.4 TS1M7 | 9.4 TS1M8 |
| Windows 7 Enterprise 32 bit | 9.4 TS1M7 | 9.4 TS1M8 |
| Windows 7 Enterprise x64 | 9.4 TS1M7 | 9.4 TS1M8 |
| Windows 7 Home Premium 32 bit | 9.4 TS1M7 | 9.4 TS1M8 |
| Windows 7 Home Premium x64 | 9.4 TS1M7 | 9.4 TS1M8 |
| Windows 7 Professional 32 bit | 9.4 TS1M7 | 9.4 TS1M8 |
| Windows 7 Professional x64 | 9.4 TS1M7 | 9.4 TS1M8 |
| Windows 7 Ultimate 32 bit | 9.4 TS1M7 | 9.4 TS1M8 |
| Windows 7 Ultimate x64 | 9.4 TS1M7 | 9.4 TS1M8 |
| 64-bit Enabled AIX | 9.4 TS1M7 | 9.4 TS1M8 |
| 64-bit Enabled Solaris | 9.4 TS1M7 | 9.4 TS1M8 |
| HP-UX IPF | 9.4 TS1M7 | 9.4 TS1M8 |
| Linux for x64 | 9.4 TS1M7 | 9.4 TS1M8 |
| Solaris for x64 | 9.4 TS1M7 | 9.4 TS1M8 |
*
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.
Running a query against a DBMS might return the error "column ambiguously defined." This issue can happen when you use a LENGTH= attribute on a column on the select list.
| Type: | Problem Note |
| Priority: | medium |
| Date Modified: | 2021-04-27 10:12:33 |
| Date Created: | 2021-03-08 11:13:50 |