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 2 of 2

Thread: SQL Query to amend global mapping

  1. #1
    mikemurphy is offline Senior Member
    Join Date
    Mar 2006
    Location
    United Kingdom
    Posts
    207

    Default SQL Query to amend global mapping

    Anyone able to let me know how to code a query to take each product from a subcategory and also map it to the parent category ? I have several hundred products, all in sub categories needing to be mapped to their parent also, and it seems like a big manual job ???

    thnx
    8.0.1.4 W2008R2 64-bit MSSQL2005

  2. #2
    mmcgeachy is offline Senior Member
    Join Date
    Sep 2008
    Posts
    174

    Default

    Try
    Code:
    INSERT INTO ProductCategory (ProductID,CategoryID) select ProductID,1 from ProductCategory where CategoryID=2
    Replacing 1 and 2 with the appropriate categoryids.