SAS Support Site Home | Samples and SAS Notes Home
SAS Notes V6-SQL-D001
Incorrect results in SQL when using a view which contains an EXCEPT CORR


When using the EXCEPT set operator in conjunction with the CORR keyword in a SQL view, incorrect results may be produced. An excerpt of a situational piece of code follows:

    proc sql;
    create view work.viewc as     /*No NOTES, WARNINGS or ERRORS are   */
    select idvar from             /*produced, however, 0 rows were     */
    (( select idvar from seta     /*returned, which was incorrect given*/
        where classvar = 1   )    /*the data used in the test.         */
       except corr
       select idvar from setb
        where classvar = 1   ))
    order by idvar;
    quit;

A circumvention is to create a SAS data set using the CREATE TABLE statement instead of creating an SQL view.

This problem is fixed at Release 6.12 TSLEVEL 020 and beyond, and Release 6.09E TSLEVEL 455 and beyond.


Products: BASE
Component: SQL
Priority: ALERT
Status: Outstanding Problem
Date: Fri, 21 Mar 1997

System Release Reported Release Fixed
OS/390 (MVS) 6.08 TS420 6.09 TS455  
AIX/6000 6.11 TS020 6.12 TS045  
HP-UX Operating Systems 6.11 TS020 6.12 TS045  
IBM OS/2 6.11 TS020 6.12 TS045  
Solaris 6.11 TS020 6.12 TS045  
Windows 3.11 6.11 TS020 6.12 TS045  
VM/ESA (CMS) 6.08 TS420 6.09 TS455  
VSE/ESA (VSE) 6.08 TS420  
OpenVMS VAX 6.08 TS420 6.09 TS455  
Intel ABI 6.11 TS040  
Silicon Graphics Unix 6.11 TS040  
Compaq Tru64 Unix 6.11 TS040 6.12 TS040  
Windows NT 6.11 TS040 6.12 TS045  
Windows 95 6.11 TS040 6.12 TS045  
VM/ESA (CMS) 6.09 TS450 6.09 TS455  
OS/390 (MVS) 6.09 TS450 6.09 TS455  
OpenVMS VAX 6.09 TS450 6.09 TS455  
AIX/6000 6.09 TS027 6.12 TS045  
ConvexOS 6.09 TS027  
HP-UX Operating Systems 6.09 TS027 6.12 TS045  
Solaris 6.09 TS027 6.12 TS045  
DEC Ultrix 6.09 TS027  
OpenVMS Alpha 6.09 TS027 6.12 TS045  
Windows NT 6.09 TS027 6.12 TS020  

No Fixes Available