Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!boulder!sunybcs!bingvaxu!leah!emb978 From: emb978@leah.Albany.Edu (Eric M. Boehm) Newsgroups: comp.databases Subject: How to do (SET MINUS SET) in SQL under VAX/VMS Keywords: SQL VAX/VMS MINUS SET Message-ID: <1798@leah.Albany.Edu> Date: 27 Apr 89 23:26:05 GMT Organization: The University at Albany, Computer Services Center Lines: 20 I cannot seem to accomplish a set minus operation in SQL under VAX/VMS 5.0 without crashing SQL or generating bug check dumps Essentially, I want to select all tuples in set 1 but not also in set 2. For example, I want: SELECT S_ID, SW_ID FROM TEMP1 WHERE ((S_ID,SW_ID) IN (SELECT S_ID, SW_ID FROM TEMP2)) AND ((S_ID,SW_ID) NOT IN (SELECT S_ID, SW_ID FROM TEMP3)); However, SQL will not allow something like (S_ID,SW_ID). It complains that I have two many columns in the value expression for IN (it seems SQL will only allow a single column before the IN). Can set minus be accomplished in SQL under VAX/VMS? If so, could someone please tell me how? Thanks in advance - please reply via e-mail. Eric M. Boehm EMB978@ALBNYVMS.BITNET EMB978@LEAH.ALBANY.EDU