Results 1 to 3 of 3

Thread: [resolved] product table - colors table subquery questions.

Threaded View

  1. #1

    Thread Starter
    Fanatic Member ZeBula8's Avatar
    Join Date
    Oct 2002
    Posts
    548

    Resolved [resolved] product table - colors table subquery questions.

    Thinking of how to go about this:

    I have a products table with many products.
    These products come in various colors.

    In my products table, I would like to have one field, [color], that indicates
    the various colors this product is available in.

    Also, I have a color table, with [colorID], [color] fields.


    In the [product].[color] field, I tried inserting data like:
    1,2,4,6 and using a subquery such as:
    select color from color where colorid in (select color from products where productid = 1)

    but with no luck.



    My ideal example:
    If a user selects a product, a drop down is populated with
    all of the available colors.


    Wondering how to go about creating the sql for retrieving
    this.

    Is there another way to do this?
    Last edited by ZeBula8; Dec 4th, 2006 at 10:36 PM. Reason: resolved

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width