Results 1 to 2 of 2
  1. #1
    Cined is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Apr 2010
    Posts
    9

    Advanced Query Guidance

    Hi,

    Hopefully I can explain this well enough...

    So I have two tables. One which contains Potential Customer information along with their Vehicle requirements (Vehicle Type, Vehicle Colour) etc...



    The other table contains a list of the Vehicles. This includes data such as NumberOfSeats, Max Speed, Price etc...


    I need a query that will list of Vehicles (from the Vehicles table) that satisfy's the Potential Customers requirements (Vehicle Type) etc.

    There's a few things I'd like to avoid in the query. I want to list these by ONLY specifying the Potential Customer's ID (Cust ID). I.E I don't want to have to do something like WHERE `Cust ID` = 1 AND ... AND ... AND ...


    I thought about this and concluded that a JOIN or UNION is most likely needed to be used. But when I was trying to put a JOIN statement together, I found that I'd have to list loads of JOIN ON feilds:

    Code:
    SELECT * 
    FROM [Potential Customer] INNER JOIN [Vehicles] AS Matches
    	ON Matches.`Number of Seats` >= [Potential Customer].`Min Seats` AND
    	ON Matches.`Color` >= [Potential Customer].`Preferred Color` =  AND 
    	...	 
    
    WHERE [Potential Customer].`Cust No` = 3

    Is there a better way to do this?


    Thanks.
    Last edited by Cined; 03-04-2011 at 03:40 PM.

  2. #2
    Cined is offline Novice
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Apr 2010
    Posts
    9
    Really, no one?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Advanced Form dropdown
    By stevenrb in forum Access
    Replies: 1
    Last Post: 02-04-2011, 10:27 AM
  2. Advanced Query
    By Exwarrior187 in forum Queries
    Replies: 6
    Last Post: 01-14-2011, 10:11 AM
  3. Advanced filter form
    By akingsley in forum Forms
    Replies: 4
    Last Post: 10-10-2010, 11:28 AM
  4. Advanced Searching
    By mbolster in forum Forms
    Replies: 3
    Last Post: 07-06-2010, 10:10 AM
  5. Advanced Report Filter
    By bigdan5428 in forum Reports
    Replies: 1
    Last Post: 05-08-2010, 08:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums