Bulk insert of items

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
7 Jahre weitere
Hello,

I am looking for a query to import items to DB.

I added the product from an external table

After I added the categories:


INSERT  INTO dbo.UrlRecord
        ( EntityId ,
          EntityName ,
          Slug ,
          IsActive ,
          LanguageId
        )
        SELECT  Id ,
                'Product' ,
                Name ,
                1 ,
                0
        FROM    dbo.Product
        WHERE   ParentGroupedProductId = ( SELECT   Id
                                           FROM     dbo.Category
                                           WHERE    Name LIKE ( SELECT
                                                              descripcion
                                                              FROM
                                                              externalTable
                                                              WHERE
                                                              id_family= '0102'
                                                              )
                                         )

I tried adding the urls

INSERT INTO dbo.UrlRecord
        ( EntityId ,
          EntityName ,
          Slug ,
          IsActive ,
          LanguageId
        )
SELECT id,'Category', name, 1, 0 FROM dbo.Category


But I am still having issues to see the items properly.


Could anybody advise how to create a sql query to insert the products properly in one go?

Thank you in advance.
7 Jahre weitere
lumeEire wrote:
But I am still having issues to see the items properly.

Could anybody advise how to create a sql query to insert the products properly in one go?

The issue you're seeing is probably with non-alphanumeric characters in the urls (like spaces). Have a look at this post for a couple of scalar valued functions I've posted before for generating nop compatible SEO friendly urls: https://www.nopcommerce.com/boards/t/33529/updating-product-table-via-sql-causes-product-links-to-not-work-until-manually-saved.aspx#136899
7 Jahre weitere
Thank you, that had helped me.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.