Icon View Incident Report

Serious Serious
Reported By: Jack Marsh
Reported On: 1/11/2006
For: Version 4.22 Build 3
# 2154 SQL INTERSECT and EXCEPT Operators Not Executing Correctly When Combined

am new to SQL and trying to determine how to write a query to perform the following. I have a table that contains 2 columns: GroupCode and ContactCode, where contacts can belong to several groups. I would like to be able to select ContactCode where the contact is a member of both groups 7 and 8, unless the contact is also a member of group 10.

I tried the following as I assumed the query would first generate the list of contacts in both 7 & 8 and then remove those in 10, but this doesn't seem to work.

SELECT ContactCode FROM ContactMembership WHERE (GroupCode = 7)
INTERSECT
SELECT ContactCode FROM ContactMembership WHERE (GroupCode = 8)
EXCEPT
SELECT ContactCode FROM ContactMembership WHERE (GroupCode = 10)




Resolution Resolution
Fixed Problem on 1/13/2006 in version 4.22 build 4


Products Affected Products Affected
DBISAM Additional Software and Utilities
DBISAM CLX Client-Server
DBISAM CLX Client-Server with Source
DBISAM CLX Standard
DBISAM CLX Standard with Source
DBISAM ODBC Client-Server
DBISAM ODBC Client-Server with Source
DBISAM ODBC Standard
DBISAM ODBC Standard with Source
DBISAM VCL Client-Server
DBISAM VCL Client-Server with Source
DBISAM VCL Standard
DBISAM VCL Standard with Source

Image