Table of Contents

{$page}

Explanation of SQL

This SQL query/report provides a simple listing of

Add this as a SQL report for easiest access.

Risk of Data Corruption if Run Improperly

None. This is a selection query and no data is modified in the running of it.

SQL

code_formatsql

select

  (Select ElementName from PricingElement 
   where ID = Product.CategoryID and ClassTypeID = Product.CategoryClassTypeID) 
  as [Product Category],
  ItemName as [Product Name],
  PP.PricingPlanTypeName as [Pricing Plan],
  (select AccountName from GLAccount where ID = PP.AccountCodeID) as [Income Account],
  (Select ExportAccountName from GLAccount where ID = PP.AccountCodeID) as [Export Name],
  Product.ID as ProductID,
  PP.AccountCodeID as IncomeAccountID

from CustomerGoodsItem Product

left join PricingPlan PP on PP.GoodsItemID = Product.ID

where Product.ID > 0 and Product.ClassTypeID = 12000

order by [Product Category], [Product Name], [Pricing Plan]

code

Version Information