SUPPORT / SAMPLES & SAS NOTES
 

Support

Problem Note 38842: An SQL query that is run against an Oracle table might return incorrect results if a WHERE clause contains the BETWEEN operator and a date operand

DetailsHotfixAboutRate It

The SQL procedure might return an incorrect results set from Oracle. This problem can happen if a query contains both a BETWEEN operator and a date operand in the WHERE clause, as shown in the following example:

select * from oralib.sometable where somedata=1 AND '31JAN2010:00:00:00'dt BETWEEN (somedate1) AND (somedate2);

You can circumvent this issue by rewriting the WHERE clause, as follows:

where somedata=1 AND (somedate1 <= '31JAN2010:00:00:00'dt <= somedate2);

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



Operating System and Release Information

Product FamilyProductSystemSAS Release
ReportedFixed*
SAS SystemSAS/ACCESS Interface to OracleTru64 UNIX9.1 TS1M3 SP49.1 TS1M3 SP4
Solaris for x649.1 TS1M3 SP49.1 TS1M3 SP4
OpenVMS Alpha9.1 TS1M3 SP49.1 TS1M3 SP4
Linux on Itanium9.1 TS1M3 SP49.1 TS1M3 SP4
Linux9.1 TS1M3 SP49.1 TS1M3 SP4
HP-UX IPF9.1 TS1M3 SP49.1 TS1M3 SP4
64-bit Enabled Solaris9.1 TS1M3 SP49.1 TS1M3 SP4
64-bit Enabled HP-UX9.1 TS1M3 SP49.1 TS1M3 SP4
64-bit Enabled AIX9.1 TS1M3 SP49.1 TS1M3 SP4
Windows Vista9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows XP Professional9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows Server 2003 Standard Edition9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise Edition9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter Edition9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows NT Workstation9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows 2000 Professional9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows 2000 Server9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows 2000 Datacenter Server9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows 2000 Advanced Server9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows XP 64-bit Edition9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows Server 2003 Enterprise 64-bit Edition9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft Windows Server 2003 Datacenter 64-bit Edition9.1 TS1M3 SP49.1 TS1M3 SP4
Microsoft® Windows® for 64-Bit Itanium-based Systems9.1 TS1M3 SP49.1 TS1M3 SP4
z/OS9.1 TS1M3 SP49.1 TS1M3 SP4
* 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.