You can also export to CSV or Excel file 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.
- Login as host.
- Go to Host > SQL page.
- Choose "SiteSqlServer" for your Connection dropdown.
- Enter the following SQL query where X is your portal ID number.
SELECT *
FROM {databaseOwner}{objectQualifier}Revindex_Storefront_SalesOrder
WHERE PortalID = X
SELECT sod.*
FROM {databaseOwner}{objectQualifier}Revindex_Storefront_SalesOrderDetail sod
JOIN {databaseOwner}{objectQualifier}Revindex_Storefront_SalesOrder so
ON so.SalesOrderID = sod.SalesOrderID
WHERE so.PortalID = X
- Click Run Script.
- 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 SalesOrderID, OrderDate and TotalAmount:
SELECT SalesOrderID, OrderDate, TotalAmount
FROM {databaseOwner}{objectQualifier}Revindex_Storefront_SalesOrder
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 SalesOrderID, OrderDate, TotalAmount
FROM {databaseOwner}{objectQualifier}Revindex_Storefront_SalesOrder
WHERE PortalID = X
ORDER BY SalesOrderID DESC
You'll find countless online tutorials on how to manipulate SQL queries.