I’ve been told I’m wrong about how something works in Business Objects and I’m convinced I’m right. If I’m wrong, I need somebody to explain it to me because it changes everything I ever thought I understood. If you help prove me right, I’ll be forever grateful…I’ve been told part of my misunderstanding is because of the data so I’ll try to give the whole story…
We have a data warehouse. It is not normalized. I am retrieving sales data for products. Each product has a product number and most have a size. The data warehouse folks have added a class with regulatory data for me. The regulatory data can send as many as three records (currently) for each product/size. These are unique based on the “Regulatory Location”. Obviously if I query sales based on product, size, and regulatory information, I will get the sales three times…once for each regulatory location.
The query I wrote included objects from my class for product number and size and from other classes for quantity, source, uom, and some other miscellaneous objects. I then limited the query to the Regulatory Location of “SC”.
It has been my understanding that when I choose a combination such as product number and size that the sum of the quantity will be based on the unique combination of product and size. They are insisting the query contained duplicates in the sum. Here is the SQL…
SELECT
SPA_ADMIN.HEARS_SAM_REGULATORY_INFO.HEARS_FILL_REX,
SPA_ADMIN.HEARS_SAM_REGULATORY_INFO.HEARS_SIZE_CD,
SPA_ADMIN.PRODUCT.STD_CONVERSION_FACTOR,
sum(SPA_ADMIN.SHIPMENT_FACT_QAD.ORDERED_QTY),
sum(SPA_ADMIN.SHIPMENT_FACT_QAD.SHIPPED_QTY),
sum(SPA_ADMIN.SHIPMENT_FACT_QAD.DUE_QTY),
sum(SPA_ADMIN.SHIPMENT_FACT_QAD.ORDERED_UNITS),
sum(SPA_ADMIN.SHIPMENT_FACT_QAD.SHIPPED_UNITS),
sum(SPA_ADMIN.SHIPMENT_FACT_QAD.DUE_UNITS),
SPA_ADMIN.CUSTOMER.SOURCE_ID,
SPA_ADMIN.PRODUCT.UNIT_OF_MEASURE,
SPA_ADMIN.PRODUCT.SOURCE_ID,
SPA_ADMIN.SHIPMENT_FACT_QAD.SOURCE_ID
FROM
SPA_ADMIN.HEARS_SAM_REGULATORY_INFO,
SPA_ADMIN.PRODUCT,
SPA_ADMIN.SHIPMENT_FACT_QAD,
SPA_ADMIN.CUSTOMER
WHERE
( SPA_ADMIN.SHIPMENT_FACT_QAD.CUSTOMER_KEY=SPA_ADMIN.CUSTOMER.CUSTOMER_KEY )
AND ( SPA_ADMIN.SHIPMENT_FACT_QAD.PRODUCT_KEY=SPA_ADMIN.PRODUCT.PRODUCT_KEY )
AND ( SPA_ADMIN.PRODUCT.SKU=SPA_ADMIN.HEARS_SAM_REGULATORY_INFO.HEARS_AOM_PARTNO )
AND (
SPA_ADMIN.CUSTOMER.SHIP_TO_STATE = 'CA'
AND SPA_ADMIN.SHIPMENT_FACT_QAD.INVOICE_DATE_KEY BETWEEN 20030101 AND 20030131
AND SPA_ADMIN.HEARS_SAM_REGULATORY_INFO.HEARS_REG_GROUP_ID = 'SOUTH COAST'
)
GROUP BY
SPA_ADMIN.HEARS_SAM_REGULATORY_INFO.HEARS_FILL_REX,
SPA_ADMIN.HEARS_SAM_REGULATORY_INFO.HEARS_SIZE_CD,
SPA_ADMIN.PRODUCT.STD_CONVERSION_FACTOR,
SPA_ADMIN.CUSTOMER.SOURCE_ID,
SPA_ADMIN.PRODUCT.UNIT_OF_MEASURE,
SPA_ADMIN.PRODUCT.SOURCE_ID,
SPA_ADMIN.SHIPMENT_FACT_QAD.SOURCE_ID
Because I selected objects from both classes this caused the join
SPA_ADMIN.PRODUCT.SKU=SPA_ADMIN.HEARS_SAM_REGULATORY_INFO.HEARS_AOM_PARTNO )
which I believe created a query to sum based on product and size and was unique on that basis.
I said that the whole purpose of Business Objects is that it will sum based on the scenario created by the objects chosen. I’m really confused…
Help?
Eileen King (BOB member since 2002-07-10)