3790:
3791: CURSOR sales_csr (p_as_of_date IN DATE,
3792: p_record_type_id IN NUMBER) IS
3793: SELECT SUM(sales.sales)
3794: FROM ozf_search_selections_t acct,
3795: ozf_search_selections_t prod,
3796: ozf_order_sales_v sales,
3797: ozf_time_rpt_struct rpt
3798: where acct.search_type = 'QUALIFIER'
3791: CURSOR sales_csr (p_as_of_date IN DATE,
3792: p_record_type_id IN NUMBER) IS
3793: SELECT SUM(sales.sales)
3794: FROM ozf_search_selections_t acct,
3795: ozf_search_selections_t prod,
3796: ozf_order_sales_v sales,
3797: ozf_time_rpt_struct rpt
3798: where acct.search_type = 'QUALIFIER'
3799: and prod.search_type = 'ITEM'
3812: c.time_id) target
3813: FROM ozf_product_allocations a
3814: ,ozf_account_allocations b
3815: ,ozf_time_allocations c
3816: ,ozf_search_selections_t acct
3817: ,ozf_search_selections_t prod
3818: WHERE acct.search_type = 'QUALIFIER'
3819: AND prod.search_type = 'ITEM'
3820: AND a.allocation_for = 'CUST'
3813: FROM ozf_product_allocations a
3814: ,ozf_account_allocations b
3815: ,ozf_time_allocations c
3816: ,ozf_search_selections_t acct
3817: ,ozf_search_selections_t prod
3818: WHERE acct.search_type = 'QUALIFIER'
3819: AND prod.search_type = 'ITEM'
3820: AND a.allocation_for = 'CUST'
3821: AND a.item_type = prod.attribute_id