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: manipulating data in back end.

  1. #1
    GoodFella is offline Member
    Join Date
    Mar 2009
    Posts
    99

    Default manipulating data in back end.

    Are there any implications of making updates / deletes to products through the back end.

    I would like to delete all products for a certain manufacturer. There are about 10. Will run into any problems doing it this way?

    DELETE FROM Products
    WHERE PRODUCT ID IN (1,2,3,4,5,6,7,8,9,10)

    DELETE FROM ProductVariant
    WHERE PRODUCT ID IN (1,2,3,4,5,6,7,8,9,10)

    Thank you.

  2. #2
    mbertulli is offline Senior Member
    Join Date
    Aug 2008
    Posts
    243

    Default

    You could try a more simply query instead of passing in specific Ids.

    Try something like this:

    Delete From Product
    Where ProductId IN (
    Select p.ProductId From Product p inner join ProductManufacturer pm on pm.ProductId = p.ProductId
    Where m.ManufacturerId = 1234
    )

    1234 = The ID of the Manufacturer you want to delete products for.

    The query for the ProductVariant table is very similar.

    Just ensure you remove records from ProductManufacturer, Product, and ProductVariant.
    Matthew Bertulli
    Demac Media
    mbertulli@demacmedia.com
    Custom Web Design & E-Commerce Development
    AspDotNetStoreFront Platinum DevNet Partner
    ----

    Custom Skinning & Design
    Web Services Integration
    Custom Reporting
    Salesforce.com eCommerce AspDotNetStoreFront Integration

  3. #3
    GoodFella is offline Member
    Join Date
    Mar 2009
    Posts
    99

    Default

    I am actually using the nukeproduct sp. Figured this is the best way to go.