Summary: | /*
Note:
The following script may need to be altered depending on the version of NopCommerce. Some fields may not be applicable to older versions.
*/
select
C.CustomerID, C.Email, C.RegistrationDate, C.Username, C.IsAdmin, C.DateOfBirth,
O.OrderID, O.OrderTax,O.OrderTotal,O.OrderDiscount,O.OrderWeight,OS.Name,
O.PaymentMethodName,O.AuthorizationTransactionID,O.AuthorizationTransactionCode,O.AuthorizationTransactionResult,
O.PurchaseOrderNumber,O.PaymentStatusID,O.BillingFirstName,O.BillingLastName,O.BillingPhoneNumber,O.BillingEmail,
O.BillingFaxNumber,O.BillingCompany,O.BillingAddress1,O.BillingAddress2,O.BillingCity,O.BillingStateProvince,O.BillingStateProvinceID,
O.BillingZipPostalCode,O.BillingCountry,O.ShippingFirstName,O.ShippingLastName,
O.ShippingPhoneNumber,O.ShippingEmail,O.ShippingFaxNumber,O.ShippingCompany,O.ShippingAddress1,O.ShippingAddress2,
O.ShippingCity,O.ShippingStateProvince,O.ShippingZipPostalCode,O.ShippingCountry,
O.ShippingMethod,O.ShippedDate,O.Deleted,O.CreatedOn 'OrderCreatedOn',O.OrderSubtotalInclTax,O.OrderSubtotalExclTax,
O.OrderShippingInclTax,O.OrderShippingExclTax,O.PaymentMethodAdditionalFeeInclTax,O.PaymentMethodAdditionalFeeExclTax,O.PaidDate,
O.CustomerIP,O.CheckoutAttributeDescription,O.CheckoutAttributesXML,O.DeliveryDate,O.TaxRates,O.RefundedAmount,O.OrderSubTotalDiscountInclTax,
O.OrderSubTotalDiscountExclTax,
OPV.ProductVariantID, OPV.AttributeDescription, OPV.Quantity, OPV.UnitPriceInclTax, OPV.UnitPriceExclTax,
OPV.PriceInclTax, OPV.PriceExclTax, OPV.DiscountAmountInclTax, OPV.DiscountAmountExclTax, OPV.DownloadCount,
OPV.IsDownloadActivated, OPV.AttributesXML,
PV.SKU, PV.IsDownload, PV.IsShipEnabled, PV.IsFreeShipping, PV.IsTaxExempt, PV.Price,
P.ProductId, P.Name, P.ShortDescription, P.FullDescription
from Nop_Order O
inner join Nop_Customer C on C.CustomerID = O.CustomerID
inner join Nop_OrderProductVariant OPV on O.OrderID = OPV.OrderID
inner join Nop_ProductVariant PV on PV.ProductVariantId = OPV.ProductVariantID
inner join Nop_Product P on P.ProductId = PV.ProductID
inner join Nop_OrderStatus OS on OS.OrderStatusID = O.OrderStatusID |