Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2004
    Posts
    2

    Angry Unanswered: Access substitute for EXCEPT

    Hello,

    Does anyone know how to reproduce the following code to work in Access?

    (SELECT * FROM Table1)
    EXCEPT
    (SELECT * FROM Table2)

    It works fine on SQL Server, but when poised against Access it produces "an error in UNION statement"... It seems that Access only supports the UNION syntax.

    Basically, what I am trying to do is pull any data from one table that is not in another.

    Any help is greatly appreciated.

    Thx,

    -rViking.

  2. #2
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    it's too late in the evening for me to type the SQL from memory, but have a go with A's query generator: new: find unmatched

    it will give you A's syntax

    izy
    currently using SS 2008R2

  3. #3
    Join Date
    Sep 2003
    Location
    The extremely Royal borough of Kensington, London
    Posts
    778
    Select *
    from tableA
    where column NOT IN
    ...

    Select *
    from tableA
    where NOT EXISTS
    ...
    Bessie Braddock: Winston, you are drunk!
    Churchill: And Madam, you are ugly. And tomorrow, I'll be sober, and you will still be ugly.

  4. #4
    Join Date
    Feb 2004
    Posts
    2
    Originally posted by r123456
    Select *
    from tableA
    where column NOT IN
    ...

    Select *
    from tableA
    where NOT EXISTS
    ...
    Sweet Jesus!

    Thx!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •