Problem Note 1863: Incorrect number of observations returned using compound WHERE
with NOT IN on sorted data set
Using a compound WHERE clause that contains the NOT IN operator on the
key sort variable on a sorted SAS data set returns an incorrect number
of observations. An example
data two;
set one;
where y > 2 and x not in(0,1);
run;
where data set ONE is sorted by variable X returns an incorrect number
of observations.
The circumvention is to either use the compound WHERE clause against a
unsorted SAS data set or use an IF statement in place of the WHERE.
Operating System and Release Information
| Product Family | Product | System | Reported Release | Fixed Release* |
| SAS System | Base SAS | Microsoft Windows 95/98 | 8 TS M0 | 8.1 TS1M0 |
| Microsoft Windows NT Workstation | 8 TS M0 | 8.1 TS1M0 |
| 64-bit Enabled Solaris | 8 TS M0 | 8.1 TS1M0 |
| OpenVMS VAX | 8 TS M0 | 8.1 TS1M0 |
| Solaris | 8 TS M0 | 8.1 TS1M0 |
| ABI+ for Intel Architecture | 8 TS M0 | 8.1 TS1M0 |
| z/OS | 8 TS M0 | 8.1 TS1M0 |
| OS/2 | 8 TS M0 | 8.1 TS1M0 |
| IRIX | 8 TS M0 | 8.1 TS1M0 |
| HP-UX | 8 TS M0 | 8.1 TS1M0 |
| OpenVMS Alpha | 8 TS M0 | 8.1 TS1M0 |
| 64-bit Enabled HP-UX | 8 TS M0 | 8.1 TS1M0 |
| CMS | 8 TS M0 | 8.1 TS1M0 |
| Microsoft Windows 2000 Professional | 8 TS M0 | 8.1 TS1M0 |
| 64-bit Enabled AIX | 8 TS M0 | 8.1 TS1M0 |
| Tru64 UNIX | 8 TS M0 | 8.1 TS1M0 |
| AIX | 8 TS M0 | 8.1 TS1M0 |
*
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: | 2000-03-21 09:32:06 |
| Date Created: | 2000-03-21 09:32:06 |