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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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 | |
|
|
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 |