Search

Index

Revindex Storefront

Export products (SQL)

Last updated on 2015-06-05 1 mins. to read

You can also export products to a CSV file is using the Host > SQL module with the latest DNN 7.2 or higher. You will require host account access to run this operation. This allows you to manipulate the data to suit your file format.

  1. Login as host.
  2. Go to Host > SQL page.
  3. Choose "SiteSqlServer" for your Connection dropdown.
  4. Enter the following SQL query where X is your portal ID number.

    
    SELECT *
    FROM {databaseOwner}{objectQualifier}Revindex_Storefront_Product
    WHERE PortalID = X
    
    SELECT *
    FROM {databaseOwner}{objectQualifier}Revindex_Storefront_ProductVariant
    WHERE PortalID = X
    
  5. Click Run Script.
  6. Once the results are displayed, click on the Export to CSV or Export to Excel buttons depending on the file format you like to safeguard.

SQL query is very flexible as it allows you to specify only the columns you want. For example, you can modify the query above to show only the columns ProductID, Name and Overview:


SELECT ProductID, Name, Overview
FROM {databaseOwner}{objectQualifier}Revindex_Storefront_Product
WHERE PortalID = X

You can also limit the number of records to return only 100 records and order by descending order like this:


SELECT TOP 100 ProductID, Name, Overview
FROM {databaseOwner}{objectQualifier}Revindex_Storefront_Product
WHERE PortalID = X
ORDER BY ProductID DESC

You'll find countless online tutorials on how to manipulate SQL queries. 



Comments


Powered by Revindex Wiki