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

Thread: SQL Import RelatedProducts to Product IDs

  1. #1
    joecalardo is offline Member
    Join Date
    May 2011
    Posts
    61

    Default SQL Import RelatedProducts to Product IDs

    I'm trying to mass import related products by their id's to the main product id, I have my spreadsheet as col a is ProductID, col b is the ID of the related product....im using excel to build this query because i want to shoot in about over 500 queries.

  2. #2
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Quote Originally Posted by joecalardo View Post
    .im using excel to build this query because i want to shoot in about over 500 queries.
    Yup - That's how I'd do it...


    TTFN

    BFG

  3. #3
    BFG 9000 is offline Senior Member
    Join Date
    Oct 2006
    Location
    South UK
    Posts
    882

    Default

    Sorry - not funny I know...

    Here's the formula :-

    ="UPDATE Product SET RelatedProducts = "&B1&" WHERE ProductID = "&A1&";"


    TTFN

    BFG

  4. #4
    joecalardo is offline Member
    Join Date
    May 2011
    Posts
    61

    Default

    BFG...It's returning

    Msg 206, Level 16, State 2, Line 1
    Operand type clash: int is incompatible with ntext



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

    Default

    ="UPDATE Product SET RelatedProducts = '"&B1&"' WHERE ProductID = "&A1&";"

    There is a subtle difference in the query above, whcih includes single quotes around the RelatedProducts data:

    Relatedproducts='1234,5678'
    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!