Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: category and brand combination questions

  1. #1
    HomeIndoor is offline Member
    Join Date
    Nov 2008
    Posts
    64

    Question category and brand combination questions

    Anybody have a sql script that will allow us to
    create a report that shows
    how many brands are in each child category.

    What I mean is this. We currently have 250 or so child category.
    Each child category has any where from 4 to 14 brands associated with it.

    This could just be as simple as cross referencing the
    productID from the ProductCategory table with categoryID
    and then cross reference the ProductID from
    ProductManufacturer with the ManufactureID

    After that include the category ID name from Category table and
    also include the manufacture name as well

    so the table should look something like this


    Child Category Name Manufacture
    Round Toilet Seat American Standard

    I want to see how many combinations I have.

    thanks for your help.

    Please note, I could have over thought this process, if there is an easier way, then be my guest.

  2. #2
    esedirect is offline Senior Member
    Join Date
    Feb 2010
    Location
    Norfolk, UK
    Posts
    343

    Default

    Code:
    select distinct c.name as category, m.name as brand
    from Category as c with (nolock)
    join ProductCategory as pc with (nolock) on pc.CategoryID = c.CategoryID
    join ProductManufacturer as pm with (nolock) on pm.ProductID = pc.ProductID
    join Manufacturer as m with (nolock) on pm.ManufacturerID = m.ManufacturerID
    http://www.esedirect.co.uk
    --------------------------------------------------------------------------
    Using MS 9.2.0.0 with the following customisations:

    Lightbox/Fancybox enlarged images;
    Auto-suggest searchbox;
    Extra product information shown only to our IP Address (such as supplier info, costs, etc.);
    Failed transactions emailed via trigger;
    Custom app to show basket contents when customer online;
    Orders pushed through to accounting systems.

    All the above without source!

  3. #3
    HomeIndoor is offline Member
    Join Date
    Nov 2008
    Posts
    64

    Default Thank you

    Exactly what I was looking for.

    Thank You