Select Query Opposite

C

coyote

Any clue on how I might write a Select statement to retrieve the records
which were NOT selected from this Summary Query?

strSQL2 = "SELECT DISTINCTROW Division, GroupID, ConID, First(GroupName) AS
FirstOfGroupName, First(MedalID) As FirstOfMedalID, First(Medal) AS
FirstOfMedal, First(EntryID) AS FirstOfEntryID, First(EntryName) AS
FirstOfEntryName, First(FirstName) AS FirstOfFirstName, First(LastName) AS
FirstOfLastName, Avg(Score) AS [Avg Of Score], Min(Score) AS [Min Of Score],
Max(Score) AS [Max Of Score], Count(*) AS [Count Of Final_Medals_Assigned],
First(Score) AS FirstOfScore, First(SponsorName) As FirstofSponsorName INTO
Final_Medals "

strSQL2 = strSQL2 & "FROM Tmp_Medals_Assigned "
strSQL2 = strSQL2 & "GROUP BY Division, GroupID, ConID "
strSQL2 = strSQL2 & "ORDER BY Division, GroupID, ConID;"

Maybe It's simple, but I can't figure it out. Thanks in advance! Randy
 
K

KARL DEWEY

Left join your table to the Summary Query and set criteria on Summary Query
field to Is Null so as to pull all other records.
 
L

Lord Kelvan

for the life of me i cannot get my virtual table to work so heres what
you do

save your above query

then create another query

which is basically the same but try not to do totals first off

add the previous query to it join up the identifying columns up then
go into the sql view and for ever inner join change the = to <> and
the and to or

Regards
Kelvan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top