List:General Discussion« Previous MessageNext Message »
From:Phillip Baker Date:July 12 2010 4:24pm
Subject:Re: Query Help
View as plain text  
Table 1
Product_id  |  Product_Name
1                |  Product A
2                |  Product B
3                |  Product C

Table 2
Category_id  |  Category_Name
1                 |   Admin
2                 |   Marketing
3                 |   Support
4                 |   IT

Table 3
Product_id  |  Category_id
1                |  1
1                |  3
2                |  2
3                |  3
3                |  4

Result would look like
Product A, Admin, Support
Product B, Marketing
Product C, Support, IT

I believe this is a one to many using an index table?

Blessed Be

Phillip

If you try to protect idiots from themselves, even if you succeed, you just
wind up filling the world with idiots.
   - - Doug Casey


On Mon, Jul 12, 2010 at 5:27 AM, Jay Blanchard <jblanchard@stripped>wrote:

> [snip]
> For the life of me I cannot remember how to make a query like this and
> what
> it is called.
> I know it is fairly basic though.
>
>
> Table 1
> Product_id Product_Name
>
> Table 2
> Category_id, Category_name
>
> Table 3
> Product_id, Category_id
>
> Each product can have one or more categories.
> So I want a result that has
>
> Product A one category other category
> Product B other category
> [/snip]
>
> Can you give us an example of how you would like the output to be?
>

Thread
Query HelpPhillip Baker10 Jul
  • Re: Query HelpMichael Satterwhite10 Jul
  • RE: Query HelpJay Blanchard12 Jul
    • Re: Query HelpPhillip Baker12 Jul