SQL Select Statement Trouble

Posted on 2007-11-30
Last Modified: 2010-03-20
Hello, I am stuck and need help writing a sql statement.  In access I have these tables:
COLOR Table Contains Color, GenericColor Columns
PRODUCTS table contains Color, Brand Columns

I need to Select Color.Color, Color.GenericColor, Products.Brand.   But only select Color.Color and Color.GenericColor where Color.Color = Products.Color and the brand from the Products table = 'Brand1'  Thanks Very Much!!
Question by:grogo21
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 47

Accepted Solution

Wayne Taylor (webtubbs) earned 250 total points
ID: 20386832
SELECT     COLOR.Color, COLOR.GenericColor, PRODUCTS.Brand
                      PRODUCTS ON COLOR.Color = PRODUCTS.Color
WHERE     (PRODUCTS.Brand = 'Brand1')
LVL 61

Assisted Solution

mbizup earned 250 total points
ID: 20386834
SELECT Select Color.Color, Color.GenericColor, Products.Brand
FROM Color INNER JOIN Products ON  Color.Color = Products.Color
WHERE Products.Brand = 'Brand1'

Author Comment

ID: 20387069
What if its not comming up with any results?  
LVL 47

Expert Comment

by:Wayne Taylor (webtubbs)
ID: 20387074
Then you have no matches.

Author Comment

ID: 20387190
Never mind, it was an issue with a relationship.  I am getting results now.  Query works great!!  Thanks

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question