A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Query Advice



 
 
Thread Tools Display Modes
  #1  
Old November 29th, 2004, 03:47 PM
Helga
external usenet poster
 
Posts: n/a
Default Query Advice

This is in response to Ken Snell on 11/24/04: Looking for sample Tables and
Query Results:

Sample Table 1 (Vehicle):

Vehicle ID #
123456
8888888888
963852741
9999999999

Sample Table 2 (Mileage):

Mileage ID VIN # M Year M Month Mileage
1 123456 2004 October 12000
2 8888888888 2004 October 95000
3 9999999999 2004 October 12000

For example, when I query for all vehicle ID's that do not have a record in
Table 2 for November 2004, the results a

Vehicle ID#: 963852741

What I am expecting to get is all of the records from Table 1 because none
of them have corresponding records in Table 2. The query I am referring to
is:

SELECT Table1.FieldA
FROM Table1 LEFT JOIN Table2 ON Table1.FieldA = table2.FieldA
WHERE (((Table2.FieldA) Is Null)) OR (((Table2.FieldB)1) AND
((Table2.FieldC)2));

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Here's a shocker Mike Labosh General Discussion 2 October 26th, 2004 05:04 PM
Return repeats info in "8s" Joy Rose Running & Setting Up Queries 14 October 13th, 2004 10:07 PM
Query to join records form 2 databases bdehning General Discussion 5 August 9th, 2004 03:09 PM
Display Parameter from Form on Report sara Setting Up & Running Reports 10 July 19th, 2004 04:54 PM
query field reference help -dch Running & Setting Up Queries 4 June 2nd, 2004 07:30 PM


All times are GMT +1. The time now is 09:12 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.