Problem Note 59414: Column order might change when SAS® Visual Analytics imports Microsoft Excel files into DBMS
SAS Visual Analytics enables you to import local files into third-party database management systems (DBMS). For example, you might import a local Microsoft Excel file to Oracle. However, in some cases, the column order in the imported table might be different from the column order in the original file.
SAS Visual Analytics uses PROC SQL code to import data from the local file to DBMS. The exact code that is executed depends on the length of the column names in the source file, and the maximum column name length supported by the target database. This maximum length varies depending on the DBMS type.
For example, the maximum column name length in Oracle is 32 characters. If you are importing an Excel file to Oracle, and all of the column names are fewer than 32 characters, then SAS Visual Analytics generates the following code:
PROC SQL;
CREATE TABLE ORALIB.MYTABLE AS
SELECT * FROM WORK.MYXLSX;
However, if any of the column names exceed the 32-character limit for Oracle, then SAS Visual Analytics truncates those names, and runs a SELECT statement that lists all of the column names. When this SELECT statement is added to the code, the column order might be different from the column order in the Excel file. Here is an example of a SELECT statement:
PROC SQL;
CREATE TABLE ORALIB.MYTABLE AS
SELECT 'PRODUCT'n,'CUSTOMERFIRSTNAMELASTNAMEADDRES'n,'PROFIT'n FROM WORK.MYEXCEL;
To ensure that columns are imported into the DBMS in the same order in which they appear in the Excel file, make sure that none of the column names exceed the maximum length supported for the target DBMS.
Operating System and Release Information
| SAS System | SAS Visual Analytics | Microsoft® Windows® for x64 | 7.1 | | 9.4 TS1M2 | |
| Linux for x64 | 7.1 | | 9.4 TS1M2 | |
*
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 |
| Date Modified: | 2016-12-06 14:09:21 |
| Date Created: | 2016-11-28 08:51:59 |