{$page}

This SQL query/report provides a simple listing of

  • Product Category
  • Product
  • Pricing Plan
  • Income Account

Add this as a SQL report for easiest access.

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

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

  • Entered : 06/2010
  • Version : 3.5+
You could leave a comment if you were logged in.