Complicated query (for me anyway)

J.Windebank

Registered User.
Local time
Today, 17:25
Joined
Apr 2, 2003
Messages
37
I am tryign to create a query but just cannot even get my head around how to design it, here is what I want.

I have the following tables and fields being used for this query:

tblMain.COTRound
tblMain.DayID
tblMain.StateID
tblMain.ProgramID

tblPrograms.ID
tblPrograms.ProgramName
tblPrograms.ProgramCode

Now tblMain.ProgramID is linked to tblPrograms.ID.

I want the query to select all program names and codes from a certain COT Round that do not exist in a different COT Round.

So, pretend we have the public variables set as follows:

strCOTRound = 1690
strPrevCOTRound = 1689

I need the query to produce a list of programs and their relevent codes that exist in COT 1690 but did not exist in 1689.

Can anyone help me figure out how to write the actual query please?

Thanks,

Jordan
 
The way I learn about coding this type of query is to build up a set of nested queries, and look at the resulting SQL.

So, build a query for 1690 and a second one for 1689 and then run the unmatched query wizard on these two queries.
 
Thank you, almost works, and simpler is always better :)

Will work on it a bit further and post back if I get it working...
 
Last edited:

Users who are viewing this thread

Back
Top Bottom