Re: Minus in Access
From: John Viescas (JohnV_at_nomail.please)
Date: 02/16/04
- Next message: Jake: "Double-ebtries in Update Query"
- Previous message: Les: "Update Queries"
- In reply to: rona_at_discussions.microsoft.com: "Minus in Access"
- Next in thread: rona_at_discussions.microsoft.com: "Re: Minus in Access"
- Reply: rona_at_discussions.microsoft.com: "Re: Minus in Access"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 16 Feb 2004 07:18:01 -0600
Access does not support a MINUS operation, but you can get the same result
by using an Outer Join on the keys combined with a Null test.
SELECT BigTable.*
FROM BigTable
LEFT JOIN SmallTable
ON BigTable.PKey = SmallTable.PKey
WHERE SmallTable.PKey IS NULL
-- John Viescas, author "Microsoft Office Access 2003 Inside Out" "Running Microsoft Access 2000" "SQL Queries for Mere Mortals" http://www.viescas.com/ (Microsoft Access MVP since 1993) http://www.deanforamerica.com/johnviescas <rona@discussions.microsoft.com> wrote in message news:1117b01c3f47c$3e6a9400$a601280a@phx.gbl... > Hi > > At the moment I have two queries, one producing a full > list and the other a shortened list of the full list but > with the same fields. > I want to subtract the short list from the full list - a > MINUS I thought but I can't seem to do this in Access. > Is there a way around this? or do I have to do it in my > code once I have extracted the data from Access? (I'm > using stored queries. > > Thanks in advance.
- Next message: Jake: "Double-ebtries in Update Query"
- Previous message: Les: "Update Queries"
- In reply to: rona_at_discussions.microsoft.com: "Minus in Access"
- Next in thread: rona_at_discussions.microsoft.com: "Re: Minus in Access"
- Reply: rona_at_discussions.microsoft.com: "Re: Minus in Access"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|