Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 255
  • Last Modified:

SQL Select Statement Trouble

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!!
0
grogo21
Asked:
grogo21
  • 2
  • 2
2 Solutions
 
Wayne Taylor (webtubbs)Commented:
SELECT     COLOR.Color, COLOR.GenericColor, PRODUCTS.Brand
FROM         COLOR INNER JOIN
                      PRODUCTS ON COLOR.Color = PRODUCTS.Color
WHERE     (PRODUCTS.Brand = 'Brand1')
0
 
mbizupCommented:
SELECT Select Color.Color, Color.GenericColor, Products.Brand
FROM Color INNER JOIN Products ON  Color.Color = Products.Color
WHERE Products.Brand = 'Brand1'
0
 
grogo21Author Commented:
What if its not comming up with any results?  
0
 
Wayne Taylor (webtubbs)Commented:
Then you have no matches.
0
 
grogo21Author Commented:
Never mind, it was an issue with a relationship.  I am getting results now.  Query works great!!  Thanks
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now