SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 56535: An incorrect WHERE condition is generated when you use the META engine to access a database table

DetailsHotfixAboutRate It

An incorrect WHERE condition might be generated when you use the SQL procedure to query a database table. The problem occurs when both of the following conditions apply:

  • You use the META engine.
  • The column positions in the metadata table are different from the column positions in the database table.

    Note: Column positions can easily differ between these two tables due to changes such as columns being hidden or being manually moved or deleted.

The problem occurs because the PROC SQL query applies column attributes to a database column based on the column's position in the metadata table. When the attributes do not match, such as when a datetime format is matched with a character data type, an error might also occur.

Note: The error that is returned varies depending on what database you are using.

To circumvent the problem, use the native LIBNAME engine for the database such as ORACLE, TERADATA, GREENPLM, OLEDB, or HADOOP.

If you must use the META engine, you can circumvent the problem by completing the following steps to arrange the columns in the metadata table to match the order of the columns in the database table:

  1. Open SAS® Management Console.
  2. Select Environment Management ► Data Library Manager and then click your-library.
  3. Right-click the table and click Properties.
  4. In the EMP Properties dialog box, click the Columns tab.
  5. Drag the columns so that they are in the correct order.
  6. When you save the changes, click Yes to save the new order.

Click the Hot Fix tab in this note to access the hot fix for this issue.

The hot fix addresses the problem for Greenplum only.

Refer to the Fixed column of the Operating System and Release Information table below to find the release number in which this problem is addressed for your database.



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS Metadata ServerMicrosoft Windows Server 2003 Standard Edition9.2 TS2M0
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.2 TS2M0
Microsoft Windows XP 64-bit Edition9.2 TS2M0
Microsoft® Windows® for x649.2 TS2M09.4 TS1M3
Microsoft Windows Server 2003 Datacenter Edition9.2 TS2M0
Microsoft Windows Server 2003 Enterprise Edition9.2 TS2M0
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.2 TS2M0
Microsoft® Windows® for 64-Bit Itanium-based Systems9.2 TS2M0
Microsoft Windows Server 2003 for x649.2 TS2M0
Microsoft Windows Server 2008 R29.2 TS2M09.4 TS1M3
Microsoft Windows Server 2008 for x649.2 TS2M09.4 TS1M3
Microsoft Windows XP Professional9.2 TS2M0
Windows Vista9.2 TS2M0
Windows Vista for x649.2 TS2M0
64-bit Enabled AIX9.2 TS2M09.4 TS1M3
64-bit Enabled HP-UX9.2 TS2M09.4 TS1M3
64-bit Enabled Solaris9.2 TS2M09.4 TS1M3
HP-UX IPF9.2 TS2M09.4 TS1M3
Linux9.2 TS2M09.4 TS1M3
Linux for x649.2 TS2M09.4 TS1M3
Solaris for x649.2 TS2M09.4 TS1M3
* 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.