MySQL Forums
Forum List  »  Newbie

Query problem
Posted by: Robbie Bangels
Date: January 28, 2010 09:13AM

I'm trying to put a query together but I can't get it to do what I want

I have a table called products that looks like this

Product_ID - Product_Name
1 - Product1
2 - Product2

And I have another table that contains additional values for each products; that lik like this
Product_ID - Product_Extra_value
1 -Blue
1 - Black
2 - Purple

What I want to acheive is a table like this
1 Product1 - Blue - Black
2 Product2 - Purple

I've set up a query with a left join but in that case I have a double entry of product1. Can someone put me on the right track. thanks

Options: ReplyQuote

Written By
Query problem
January 28, 2010 09:13AM
January 28, 2010 09:15AM
January 28, 2010 09:30AM
January 28, 2010 09:36AM
January 28, 2010 01:05PM
January 28, 2010 01:14PM
January 28, 2010 05:07PM
January 28, 2010 05:52PM
January 29, 2010 03:08AM
January 29, 2010 03:40AM
January 29, 2010 06:11AM

Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.