Problem Note 41534: Incorrect results occur when Boolean logic is used in WHERE and HAVING clauses
The code found in the Full Code tab in this Note returns incorrect results and produces the following message in the SAS log file:
NOTE: Table WORK.AAA created, with 4 rows and 1 columns.
Also, simple queries that use a WHERE clause like the following
fail to apply the Boolean expression
((var > 3) = 0) for the SAS® Scalable Performance Data Server, and they give incorrect results:
select * from spdslib.table WHERE ((var > 3) = 0 );
To prevent the problem, rewrite the Boolean expression by reversing the logic.
For example:
WHERE ((var > 3) = 0 ) is equivalent to WHERE (var <= 3) or WHERE NOT (var < 3)
Select the Hot Fix tab in this Note to access the hot fix for this problem.
Operating System and Release Information
SPDS | Scalable Performance Data Server | Microsoft Windows Server 2003 Enterprise Edition | 4.4 TSM12 | 4.4 TSM13 | | |
Microsoft Windows Server 2003 Standard Edition | 4.4 TSM12 | 4.4 TSM13 | | |
Microsoft Windows Server 2008 | 4.4 TSM12 | 4.4 TSM13 | | |
Microsoft Windows 2000 Advanced Server | 4.4 TSM12 | 4.4 TSM13 | | |
Microsoft Windows 2000 Datacenter Server | 4.4 TSM12 | 4.4 TSM13 | | |
Microsoft Windows 2000 Server | 4.4 TSM12 | 4.4 TSM13 | | |
Microsoft Windows Server 2003 Datacenter Edition | 4.4 TSM12 | 4.4 TSM13 | | |
Solaris for x64 | 4.4 TSM12 | 4.4 TSM13 | | |
HP-UX IPF | 4.4 TSM12 | 4.4 TSM13 | | |
64-bit Enabled Solaris | 4.4 TSM12 | 4.4 TSM13 | | |
64-bit Enabled HP-UX | 4.4 TSM12 | 4.4 TSM13 | | |
64-bit Enabled AIX | 4.4 TSM12 | 4.4 TSM13 | | |
Microsoft Windows XP Professional | 4.4 TSM12 | 4.4 TSM13 | | |
*
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.
libname spdslib sasspds 'tmp' server=localhost.5400 user='anonymous' IP=YES LIBGEN=YES;
data spdslib.test_table;
a = 1; b = 1; output;
a = 2; b = 1; output;
a = 3; b = 1; output;
a = 4; b = 1; output;
run;
proc sql noprint;
connect to SASSPDS( schema="TMP" USER="anonymous" HOST="localhost" Serv="5400" );
create table aaa as select * from connection to SASSPDS(
select a
from test_table
group by a
having ((sum(b) = 1) = 0)
);
disconnect from SASSPDS;
quit;
Type: | Problem Note |
Priority: | alert |
Date Modified: | 2010-11-09 19:08:24 |
Date Created: | 2010-11-09 08:05:38 |