Home » SQL & PL/SQL » SQL & PL/SQL » ORA-00937:not a single-group group function|ORA-06512:at"schema.procedure name)?
ORA-00937:not a single-group group function|ORA-06512:at"schema.procedure name)? [message #251221] Thu, 12 July 2007 13:10 Go to next message
vamcs
Messages: 20
Registered: June 2007
Location: somerset
Junior Member

ORA-00937:not a single-group group function|ORA-06512:at"schema.procedure name)?
The details of this procedure are the emp table is used in the emp1 which is shown in line 19


1 DECLARE
2 cur_emp sys_refcursor;
3 TYPE t_tab IS TABLE OF emp%ROWTYPE;
4 tt t_tab;
5 cur_emp1 sys_refcursor;
6 TYPE t1_tab IS TABLE OF emp1%ROWTYPE;
7 tt1 t1_tab;
8 BEGIN
9 OPEN cur_emp FOR
10 SELECT c1,c2,c3 FROM t1,t2,t3 where t1.c1=t2.c2 and t1.c1=t3.c3;
11 LOOP
12 FETCH cur_emp BULK COLLECT INTO tt LIMIT 100000;
13 EXIT WHEN tt.COUNT=0;
14 FOR i IN 1..tt.COUNT LOOP
15 insert in to emp (c1,c2,c3) values (tt(i).c1,tt(i).c2,tt(i).c3;
16 END LOOP;
17 END LOOP;
18 OPEN cur_emp FOR
19 SELECT c11,c12,c13 FROM emp,t12,t13 where emp.c11=t12.c12 and t11.c11=t13.c13;
20 LOOP
21 FETCH cur_emp1 BULK COLLECT INTO tt1 LIMIT 100000;
22 EXIT WHEN tt1.COUNT=0;
23 FOR j IN 1..tt1.COUNT LOOP
24 insert in to emp1 (c11,c12,c13) values (tt1(j).c11,tt1(j).c12,tt1(j).c13;
25 END LOOP;
26 END LOOP;
27 END;
/
Re: ORA-00937:not a single-group group function|ORA-06512:at"schema.procedure name)? [message #251222 is a reply to message #251221] Thu, 12 July 2007 13:13 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Please read and follow How to format your posts and How to get a quick answer to your question: TIPS AND TRICKS
Make sure that lines of code do not exceed 80 or 100 characters when you format.
Please always post your Oracle version (4 decimals).

Copy and paste the execution from SQL*Plus.

Regards
Michel
Re: ORA-00937:not a single-group group function|ORA-06512:at"schema.procedure name)? [message #251230 is a reply to message #251222] Thu, 12 July 2007 13:19 Go to previous messageGo to next message
vamcs
Messages: 20
Registered: June 2007
Location: somerset
Junior Member

CREATE OR REPLACE Procedure Pop_Rev_rpt_Detail_Tbl is
cur_temp sys_refcursor;
cur_om sys_refcursor;
TYPE t_tab IS TABLE OF XXDSC_REVENUE_REPORT_DETAIL_TP%ROWTYPE;
temp_array t_tab;
TYPE t1_tab IS TABLE OF XXDSC_REVENUE_REPORT_DETAIL_MV%ROWTYPE;
om1_array t1_tab;
BEGIN
OPEN cur_temp FOR
select /*+ all_rows
*/
GIR.REFERENCE_2 HEADER_ID,
GIR.REFERENCE_3 LINE_ID,
GIR.REFERENCE_4 SCHEDULE_PERIOD,
GIR.REFERENCE_5 DRAFT_REVENUE_NUM,
period.period_name gl_period,
period.period_set_name period_set_name,
period.period_year period_year,
period.period_num period_num,
gcc.SEGMENT1 company,
gcc.SEGMENT2 segment,
gcc.SEGMENT3 product,
gcc.SEGMENT4 account,
gcc.SEGMENT5 project,
substrb(prod.description,1,150) prod_desc ,
substrb(seg.description,1,150) seg_desc ,
substrb(acct.description,1,150) acct_desc,
books.SET_OF_BOOKS_ID set_of_books_id,
books.name set_of_books,
h.JE_CATEGORY je_category,
h.JE_SOURCE je_source,
h.default_effective_date gl_date,
l.je_line_num je_line_num,
gcc.code_combination_id code_combination_id,
substrb((gcc.SEGMENT1||gcc.SEGMENT2||
gcc.SEGMENT3||gcc.SEGMENT4||
gcc.SEGMENT5),1,40) gl_abbrev,
H.CURRENCY_CONVERSION_RATE CURRENCY_CONVERSION_RATE
from
gl_import_references gir,
GL_JE_HEADERS H ,
gl_je_lines l,
gl_periods period,
gl_sets_of_books books,
fnd_flex_values_vl prod,
fnd_flex_values_vl seg,
fnd_flex_values_vl acct,
gl_code_combinations gcc
where 1=1
and gir.reference_8='REV'
and l.je_header_id=gir.je_header_id
and l.je_line_num=gir.je_line_num
and l.JE_HEADER_ID=h.JE_HEADER_ID
and l.PERIOD_NAME=period.period_name
and l.SET_OF_BOOKS_ID=books.set_of_books_id
and l.CODE_COMBINATION_ID=gcc.CODE_COMBINATION_ID
and gcc.segment2=seg.flex_value
and seg.flex_value_set_id=1002434
and gcc.segment3=prod.flex_value
and prod.flex_value_set_id=1002431
and gcc.segment4=acct.flex_value
and acct.flex_value_set_id=1002432
and gcc.SEGMENT4 between 4000 and 4999
and period.period_year >= 2004;
LOOP
FETCH cur_temp BULK COLLECT INTO temp_array LIMIT 100000;
EXIT WHEN temp_array.COUNT=0;
FOR i IN 1..temp_array.COUNT LOOP
INSERT INTO XXDSC_REVENUE_REPORT_DETAIL_TP ( HEADER_ID,LINE_ID,SCHEDULE_PERIOD,DRAFT_REVENUE_NUM,GL_PERIOD,PERIOD_SET_NAME,
PERIOD_YEAR,PERIOD_NUM,COMPANY, SEGMENT,PRODUCT,ACCOUNT,PROJECT,PROD_DESC,SEG_DESC,
ACCT_DESC,SET_OF_BOOKS_ID,SET_OF_BOOKS,JE_CATEGORY,JE_SOURCE,GL_DATE,JE_LINE_NUM,CODE_COMBINATION_ID,GL_ABBREV,
CURRENCY_CONVERSION_RATE) VALUES
(temp_array(i).HEADER_ID,temp_array(i).LINE_ID,temp_array(i).SCHEDULE_PERIOD,temp_array(i).DRAFT_REVENUE_NUM,temp_array(i).GL_PERIOD, temp_array(i).PERIOD_SET_NAME,
temp_array(i).PERIOD_YEAR,temp_array(i).PERIOD_NUM,temp_array(i).COMPANY,temp_array(i). SEGMENT,temp_array(i).PRODUCT,temp_array(i).ACCOUNT,temp_array(i).PROJECT,temp_array(i).PROD_DESC,temp_array(i).SEG_DESC,
temp_array(i).ACCT_DESC,temp_array(i).SET_OF_BOOKS_ID,temp_array(i).SET_OF_BOOKS,temp_array(i).JE_CATEGORY,temp_array(i).JE_SOURCE,te mp_array(i).GL_DATE,temp_array(i).JE_LINE_NUM,temp_array(i).CODE_COMBINATION_ID,temp_array(i).GL_ABBREV,
temp_array(i).CURRENCY_CONVERSION_RATE);
END LOOP;
END LOOP;
OPEN cur_om FOR
select /*+ all_rows
*/
'OM' source,
-- Order Header Info
f.ORDER_NUMBER order_number ,
f.header_id Order_Header_ID,
f.header_id Header_ID,
substrb(f.ATTRIBUTE5,1,150) campaign_name,
substrb(f.ATTRIBUTE6,1,50) account_coordinator,
f.ORDERED_DATE ordered_date,
f.transactional_curr_code currency_code,
decode(f.open_flag,'Y','N','Y') closed_flag,
f.cust_po_number purchase_order,
f.orig_sys_document_ref sfa_order_id,
f.order_source_id order_source_id,
f.order_type_id Order_type_id,
-- Bill TO Cust Info
f.INVOICE_TO_ORG_ID bill_to_site_use_id,
billad.customer_id billto_global_cust_id,
substrb(bill.customer_name,1,50) billto_global_cust_name,
billad.attribute4 billto_cust_id,
DECODE (billad.customer_category_code,
'Parent', bill.customer_name,
billad.address1
) bill_customer_name,
billad.address1 bill_address1,
billad.address2 bill_address2,
billad.address3 bill_address3,
billad.city bill_city,
billad.state bill_state,
billad.country bill_country,
bill.CUSTOMER_CLASS_CODE bill_CUSTOMER_CLASS_CODE,
bill.CUSTOMER_CATEGORY_CODE bill_CUSTOMER_CATEGORY_CODE,
bill.CUSTOMER_TYPE bill_customer_type,
f.SHIP_TO_ORG_ID ship_to_site_use_id,
shipad.customer_id shipto_global_cust_id,
ship.customer_name shipto_global_cust_name,
shipad.attribute4 shipto_cust_id,
DECODE (shipad.customer_category_code,
'Parent', ship.customer_name,
shipad.address1
) shipto_cust_name,
shipad.address1 ship_address1,
shipad.address2 ship_address2,
shipad.address3 ship_address3,
shipad.city ship_city,
shipad.state ship_state,
shipad.country ship_country,
nvl(ship.CUSTOMER_CLASS_CODE,
bill.CUSTOMER_CLASS_CODE) CUSTOMER_CLASS_CODE,
nvl(ship.CUSTOMER_CATEGORY_CODE,
bill.CUSTOMER_CATEGORY_CODE) CUSTOMER_CATEGORY_CODE,
substrb(nvl(ship.CUSTOMER_NAME,
(DECODE (billad.customer_category_code,
'Parent', bill.customer_name,
billad.address1
))),1,50) customer,
nvl(ship.CUSTOMER_TYPE,
bill.CUSTOMER_TYPE) customer_type ,
-- Collector Info
co.name Analyst,
-- Salesrep Info
osc.salesrep_id salesrep_id,
osc.PERCENT comm_percent,
-- Order Line Data
ool.line_id order_line_id,
xsla.line_number line_number,
to_date(decode(length(ool.attribute1),
9,to_date(ool.attribute1,'DD-MON-RR'),
11,to_date(ool.attribute1,'DD-MON-RRRR'))
) line_start_date,
to_date(decode(length(ool.attribute2),
9,to_date(ool.attribute2,'DD-MON-RR'),
11,to_date(ool.attribute2,'DD-MON-RRRR'))
) line_end_date,
substrb(ool.ATTRIBUTE13,1,20) net_cpm,
substrb(ool.ATTRIBUTE3,1,50) revenue_rule,
substrb(ool.ATTRIBUTE4,1,50) billing_rule,
substrb(ool.ATTRIBUTE5,1,50) OM_SOURCE_REF,
substrb(ool.ATTRIBUTE6,1,20) hard_end_date,
substrb(ool.ORIG_SYS_DOCUMENT_REF,1,30) line_ORIG_SYS_DOCUMENT_REF,
substrb(ool.ORIG_SYS_LINE_REF,1,30) line_ORIG_SYS_LINE_REF,
substrb(ool.attribute7,1,50) line_group_id,
substrb(ool.attribute8,1,50) "Min$ Per Line Group",
substrb(ool.attribute9,1,50) "Cap$ Per Month or Line Group",
substrb(ool.ATTRIBUTE12,1,200) languages,
substrb(ool.ATTRIBUTE13,1,50) markets,
substrb(ool.attribute14,1,50) billing_period,
substrb(ool.attribute16,1,50) web_service_reference,
substrb(ool.attribute17,1,50) tax_state_country,
substrb(ool.attribute18,1,50) subscription_customer,
ool.tax_value tax_value,
ool.tax_code tax_code,
ool.tax_date tax_date,
ool.ORDERED_QUANTITY open_quantity,
-- -- XXRR data
xsla.cancelled_quantity cancelled_quantity,
nvl(xsla.closed_flag,'N') line_closed_flag,
xsla.delivered_quantity delivered_quantity,
xsla.draft_Revenue_amount * (osc.PERCENT/100) pre_impution_revenue,
xsla.inventory_item_id inventory_item_id,
xsla.list_price list_price_oe,
xsla.ordered_quantity +
nvl(xsla.cancelled_quantity,0) quantity_ordered,
xsla.revenue_recognized_amount * (osc.PERCENT/100) post_impution_revenue,
xs.forecast_amount * (osc.PERCENT/100) forecast_amount,
xsla.SELLING_PRICE UNIT_SELLING_PRICE,
round((XXRR.AMOUNT*gir.CURRENCY_CONVERSION_RATE),2) * (osc.PERCENT/100) REVENUE_AMOUNT,
xxrr.schedule_period schedule_period ,
decode(to_char(to_date('01-'||xs.schedule_period,'DD-MON-RRRR'),'MON-RR'),
gir.gl_period,
xs.delivered_quantity,0) delivered_quantity_period,
-- -- discount info
substrb(O.NAME,1,125) discount_name_1 ,
P.LIST_HEADER_ID discount_id_1 ,
round(P.PERCENT,2) discount_percent_1,
substrb(decode(P1.LIST_HEADER_ID,
P.LIST_HEADER_ID,null,O1.NAME),1,125) discount_name_2 ,
decode(P1.LIST_HEADER_ID,P.LIST_HEADER_ID,
'',P1.LIST_HEADER_ID) discount_id_2 ,
decode(P1.LIST_HEADER_ID,P.LIST_HEADER_ID,0,
round(P1.PERCENT,2)) discount_percent_2,
substrb(p.ATTRIBUTE1,1,50) discount1_Multi_Language,
substrb(p.ATTRIBUTE2,1,50) discount1_Multi_Country,
substrb(p.ATTRIBUTE3,1,50) discount1_Multi_Year,
substrb(p.ATTRIBUTE4,1,50) discount1_Sales_Manager,
-- --Gl Info
gir.gl_period gl_period,
gir.period_set_name period_set_name,
gir.period_year period_year,
gir.period_num period_num,
gir.company company,
gir.segment segment,
gir.product product,
gir.account account,
gir.project project,
gir.prod_desc prod_desc ,
gir.seg_desc seg_desc ,
gir.acct_desc acct_desc,
gir.SET_OF_BOOKS_ID set_of_books_id,
gir.set_of_books set_of_books,
0 quantity_invoiced,
0 extended_amount,
gir.JE_CATEGORY je_category,
gir.JE_SOURCE je_source,
gir.gl_date gl_date,
gir.je_line_num je_line_num,
gir.code_combination_id code_combination_id,
gir.gl_abbrev gl_abbrev,
substrb(msi.segment1,1,25) item_id,
substrb(nvl((select xi1.ITEM_DESC from xxrc_item xi1 where xi1.item_id = to_number(msi.segment1)), msi.description),1,150) item_desc ,
(select substrb(xi1.MEDIA_DESC,1,30) from xxrc_item xi1 where xi1.item_id = to_number(msi.segment1)) media_desc ,
(select substrb(xi1.BRAND_DESC,1,30) from xxrc_item xi1 where xi1.item_id = to_number(msi.segment1)) brand_desc ,
(select substrb(xi1.AD_CHANNEL_DESC,1,50) from xxrc_item xi1 where xi1.item_id = to_number(msi.segment1)) ad_channel_or_site ,
(select substrb(xi1.AD_TYPE_DESC,1,75) from xxrc_item xi1 where xi1.item_id = to_number(msi.segment1)) ad_type ,
(select substrb(xi1.sub_channel_DESC,1,75) from xxrc_item xi1 where xi1.item_id = to_number(msi.segment1)) sub_channel_or_category ,
(select substrb(xi1.uom_DESC,1,30) from xxrc_item xi1 where xi1.item_id = to_number(msi.segment1)) uom ,
(select xi1.impression_circulation from xxrc_item xi1 where xi1.item_id = to_number(msi.segment1)) impression_circulation ,
(select m.QUANTITY_PRICE_GROSS from xxrc_item_price m where m.item_id = msi.segment1 and m.eff_end_Dt is null) gross_price_rc ,
substrb(( select program_pkg from sfa_order_line sol where of_line_id = ool.line_id and rownum < 2 ),1,70) program_pkg ,
substrb((select xi1.BUSINESS_UNIT_DESC from xxrc_item xi1 where xi1.item_id = to_number(msi.segment1)),1,50) business_unit_desc ,
(select nvl(m.QUANTITY_PRICE_GROSS,0)*.85 from xxrc_item_price m where m.item_id = msi.segment1 and m.eff_end_Dt is null) net_price_rc,
ot.name Order_Type,
substrb(ol.meaning,1,90) sales_channel,
substrb(rs.name,1,50) salesrep,
substrb(rt.name,1,50) salesrep_territory,
substrb(decode(rs.salesrep_id,null,null,rst.attribute1),1,40) salesrep_sales_channel,
substrb(decode(rs.salesrep_id,null,null,rst.attribute2),1,40) salesrep_sales_region,
max(y.attribute10) salesrep_bu
from
XXDSC_REVENUE_REPORT_DETAIL_TP gir,
XXRR_SO_REVENUE_LINES XXRR,
xxrr_so_lines_all xsla,
xxrr_so_schedules_all xs,
oe_order_lines_all ool,
mtl_system_items msi,
OE_PRICE_ADJUSTMENTS P,
OE_PRICE_ADJUSTMENTS P1,
(select * from xxoe_discounts_v where arithmetic_operator = '%' ) O,
(select * from xxoe_discounts_v where arithmetic_operator = '%' ) O1,
oe_order_headers_all f,
oe_sales_credits osc,
ra_customers bill,
ra_addresses_all billad,
ra_site_uses_all billsite,
ar_collectors co,
appsr.ar_customer_profiles cp ,
ra_customers ship,
ra_addresses_all shipad,
ra_site_uses_all shipsite,
oe_order_types_all ot,
oe_lookups ol,
ra_salesreps_all rs,
ra_salesrep_territories rst,
ra_territories rt,
per_all_people_f y
where 1=1
AND f.header_id = osc.header_id
AND osc.line_id IS NULL
AND osc.PERCENT <> 0
and ool.header_id = f.header_id
and xsla.header_id= ool.header_id
and xsla.line_id= ool.line_id
and xs.header_id= xsla.header_id
and xs.line_id = xsla.line_id
and xxrr.header_id = xs.header_id
and xxrr.line_id = xs.line_id
and xxrr.schedule_period = xs.schedule_period
AND P.LINE_ID (+) = ool.LINE_ID
and (P.PRICE_ADJUSTMENT_ID = (select min(PRICE_ADJUSTMENT_ID) from OE_PRICE_ADJUSTMENTS SPA
where SPA.LINE_ID = p.LINE_ID) or P.PRICE_ADJUSTMENT_ID is null)
AND P1.LINE_ID (+) = ool.LINE_ID
and (P1.PRICE_ADJUSTMENT_ID = (select max(PRICE_ADJUSTMENT_ID) from OE_PRICE_ADJUSTMENTS SPA
where SPA.LINE_ID = p1.LINE_ID ) or P1.PRICE_ADJUSTMENT_ID is null)
and (P.list_header_id=O.DISCOUNT_ID(+) )
and (P1.list_header_id=O1.DISCOUNT_ID(+) )
and msi.inventory_item_id = ool.inventory_item_id
AND GIR.HEADER_ID =XXRR.HEADER_ID
AND GIR.LINE_ID =XXRR.LINE_ID
AND GIR.SCHEDULE_PERIOD=XXRR.SCHEDULE_PERIOD
AND GIR.DRAFT_REVENUE_NUM =XXRR.DRAFT_REVENUE_NUM
and f.INVOICE_TO_ORG_ID=billsite.site_use_id
and billsite.address_id=billad.address_id
and billad.customer_id=bill.customer_id
and cp.customer_id = bill.customer_id
AND cp.collector_id = co.collector_id
AND cp.site_use_id IS NULL
and f.ship_TO_ORG_ID=shipsite.site_use_id
and shipsite.address_id=shipad.address_id
and shipad.customer_id=ship.customer_id
and f.ordeR_type_id = ot.order_type_id
and nvl(f.SALES_CHANNEL_CODE,-1) = ol.lookup_code
and ol.lookup_type = 'SALES_CHANNEL'
and rs.SALESREP_ID = osc.salesrep_id
and rst.salesrep_id = rs.salesrep_id
and nvl(rst.end_date_active,trunc(sysdate)) in (select max(nvl(t2.end_date_active,trunc(sysdate)))from
ra_salesrep_territories t2 where t2.salesrep_id = rs.salesrep_id )
and rt.territory_id = rst.territory_id
and ltrim(rs.salesrep_number, '0') = ltrim(y.EMPLOYEE_NUMBER(+),'0')
and xxrr.request_id not in (2830226, 2830299, 2837891) ;
LOOP
FETCH cur_om BULK COLLECT INTO om1_array LIMIT 100000;
EXIT WHEN om1_array.COUNT=0;
FOR j IN 1..om1_array.COUNT LOOP
INSERT INTO XXDSC_REVENUE_REPORT_DETAIL_MV (SOURCE,ORDER_NUMBER,Order_header_id,HEADER_ID, CAMPAIGN_NAME,
ACCOUNT_COORDINATOR,ORDERED_DATE,CURRENCY_CODE,CLOSED_FLAG,PURCHASE_ORDER,SFA_ORDER_ID,order_source_id,ORDER_TYPE_ID,
bill_to_site_use_id,bill_global_cust_id,bill_global_cust_name,bill_customer_id,bill_customer_name,BILL_ADDRESS1,
BILL_ADDRESS2,BILL_ADDRESS3,BILL_CITY,BILL_STATE,BILL_COUNTRY,BILL_CUSTOMER_CLASS_CODE,BILL_CUSTOMER_CATEGORY_CODE,
BILL_CUSTOMER_TYPE,SHIP_TO_SITE_USE_ID,ship_global_cust_id,ship_global_cust_name,ship_customer_id,
ship_customer_name,SHIP_ADDRESS1,SHIP_ADDRESS2,SHIP_ADDRESS3,SHIP_CITY, SHIP_STATE,
SHIP_COUNTRY,CUSTOMER_CLASS_CODE,CUSTOMER_CATEGORY_CODE,CUSTOMER,CUSTOMER_TYPE,
analyst,salesrep_id,comm_percent,ORDER_LINE_ID,LINE_NUMBER,LINE_START_DATE,LINE_END_DATE,
NET_CPM,REVENUE_RULE,BILLING_RULE,OM_SOURCE_REF,HARD_END_DATE,LINE_ORIG_SYS_DOCUMENT_REF,LINE_ORIG_SYS_LINE_REF,
LINE_GROUP_ID,"Min$ Per Line Group","Cap$ Per Month or Line Group",LANGUAGES,MARKETS,BILLING_PERIOD,WEB_SERVICE_REFERENCE,
TAX_STATE_COUNTRY, SUBSCRIPTION_CUSTOMER, TAX_VALUE, TAX_CODE,
TAX_DATE,OPEN_QUANTITY,CANCELLED_QUANTITY, LINE_CLOSED_FLAG,
DELIVERED_QUANTITY,PRE_IMPUTION_REVENUE,INVENTORY_ITEM_ID,LIST_PRICE_OE,
QUANTITY_ORDERED,POST_IMPUTION_REVENUE,FORECAST_AMOUNT,UNIT_SELLING_PRICE ,
REVENUE_AMOUNT,SCHEDULE_PERIOD,DELIVERED_QUANTITY_PERIOD,
DISCOUNT_NAME_1,DISCOUNT_ID_1,DISCOUNT_PERCENT_1,DISCOUNT_NAME_2,
DISCOUNT_ID_2 ,DISCOUNT_PERCENT_2 ,DISCOUNT1_MULTI_LANGUAGE ,
DISCOUNT1_MULTI_COUNTRY ,DISCOUNT1_MULTI_YEAR, DISCOUNT1_SALES_MANAGER,
GL_PERIOD,PERIOD_SET_NAME,PERIOD_YEAR,PERIOD_NUM,
COMPANY,SEGMENT,PRODUCT,ACCOUNT,
PROJECT,PROD_DESC,SEG_DESC,ACCT_DESC,
SET_OF_BOOKS_ID,SET_OF_BOOKS,QUANTITY_INVOICED,
EXTENDED_AMOUNT,JE_CATEGORY,JE_SOURCE,
GL_DATE,JE_LINE_NUM,CODE_COMBINATION_ID,GL_ABBREV,
ITEM_ID,ITEM_DESC, MEDIA_DESC,
BRAND_DESC,AD_CHANNEL_OR_SITE,AD_TYPE,SUB_CHANNEL_OR_CATEGORY,
UOM,IMPRESSION_CIRCULATION, GROSS_PRICE_RC,PROGRAM_PKG,
BUSINESS_UNIT_DESC,NET_PRICE_RC) VALUES
(om1_array(j).SOURCE,om1_array(j).ORDER_NUMBER,om1_array(j).Order_header_id,om1_array(j).HEADER_ID,om1_array(j).CAMPAIGN_NAME,
om1_array(j).ACCOUNT_COORDINATOR,om1_array(j).ORDERED_DATE,om1_array(j).CURRENCY_CODE,om1_array(j).CLOSED_FLAG,om1_array(j).PURCHASE_ ORDER,om1_array(j).SFA_ORDER_ID,om1_array(j).order_source_id,om1_array(j).ORDER_TYPE_ID,
om1_array(j).bill_to_site_use_id,om1_array(j).bill_global_cust_id,om1_array(j).bill_global_cust_name,om1_array(j).bill_customer_id,om 1_array(j).bill_customer_name,om1_array(j).BILL_ADDRESS1,
om1_array(j).BILL_ADDRESS2,om1_array(j).BILL_ADDRESS3,om1_array(j).BILL_CITY,om1_array(j).BILL_STATE,om1_array(j).BILL_COUNTRY,om1_ar ray(j).BILL_CUSTOMER_CLASS_CODE,om1_array(j).BILL_CUSTOMER_CATEGORY_CODE,
om1_array(j).BILL_CUSTOMER_TYPE,om1_array(j).SHIP_TO_SITE_USE_ID,om1_array(j).ship_global_cust_id,om1_array(j).ship_global_cust_name, om1_array(j).ship_customer_id,
om1_array(j).ship_customer_name,om1_array(j).SHIP_ADDRESS1,om1_array(j).SHIP_ADDRESS2,om1_array(j).SHIP_ADDRESS3,om1_array(j).SHIP_CI TY, om1_array(j).SHIP_STATE,
om1_array(j).SHIP_COUNTRY,om1_array(j).CUSTOMER_CLASS_CODE,om1_array(j).CUSTOMER_CATEGORY_CODE,om1_array(j).CUSTOMER,om1_array(j).CUS TOMER_TYPE,
om1_array(j).analyst,om1_array(j).salesrep_id,om1_array(j).comm_percent,om1_array(j).ORDER_LINE_ID,om1_array(j).LINE_NUMBER,om1_array (j).LINE_START_DATE,om1_array(j).LINE_END_DATE,
om1_array(j).NET_CPM,om1_array(j).REVENUE_RULE,om1_array(j).BILLING_RULE,om1_array(j).OM_SOURCE_REF,om1_array(j).HARD_END_DATE,om1_ar ray(j).LINE_ORIG_SYS_DOCUMENT_REF,om1_array(j).LINE_ORIG_SYS_LINE_REF,
om1_array(j).LINE_GROUP_ID,om1_array(j)."Min$ Per Line Group",om1_array(j)."Cap$ Per Month or Line Group",om1_array(j).LANGUAGES,om1_array(j).MARKETS,om1_array(j).BILLING_PERIOD,om1_array(j).WEB_SERVICE_REFERENCE,
om1_array(j).TAX_STATE_COUNTRY, om1_array(j).SUBSCRIPTION_CUSTOMER, om1_array(j).TAX_VALUE,om1_array(j).TAX_CODE,
om1_array(j).TAX_DATE,om1_array(j).OPEN_QUANTITY,om1_array(j).CANCELLED_QUANTITY, om1_array(j).LINE_CLOSED_FLAG,
om1_array(j).DELIVERED_QUANTITY,om1_array(j).PRE_IMPUTION_REVENUE,om1_array(j).INVENTORY_ITEM_ID,om1_array(j).LIST_PRICE_OE,
om1_array(j).QUANTITY_ORDERED,om1_array(j).POST_IMPUTION_REVENUE,om1_array(j).FORECAST_AMOUNT,om1_array(j).UNIT_SELLING_PRICE ,
om1_array(j).REVENUE_AMOUNT,om1_array(j).SCHEDULE_PERIOD,om1_array(j).DELIVERED_QUANTITY_PERIOD,
om1_array(j).DISCOUNT_NAME_1,om1_array(j).DISCOUNT_ID_1,om1_array(j).DISCOUNT_PERCENT_1,om1_array(j).DISCOUNT_NAME_2,
om1_array(j).DISCOUNT_ID_2 ,om1_array(j).DISCOUNT_PERCENT_2 ,om1_array(j).DISCOUNT1_MULTI_LANGUAGE ,
om1_array(j).DISCOUNT1_MULTI_COUNTRY,om1_array(j).DISCOUNT1_MULTI_YEAR, om1_array(j).DISCOUNT1_SALES_MANAGER,
om1_array(j).GL_PERIOD,om1_array(j).PERIOD_SET_NAME,om1_array(j).PERIOD_YEAR,om1_array(j).PERIOD_NUM,
om1_array(j).COMPANY,om1_array(j).SEGMENT,om1_array(j).PRODUCT,om1_array(j).ACCOUNT,
om1_array(j).PROJECT,om1_array(j).PROD_DESC,om1_array(j).SEG_DESC,om1_array(j).ACCT_DESC,
om1_array(j).SET_OF_BOOKS_ID,om1_array(j).SET_OF_BOOKS,om1_array(j).QUANTITY_INVOICED,
om1_array(j).EXTENDED_AMOUNT,om1_array(j).JE_CATEGORY,om1_array(j).JE_SOURCE,
om1_array(j).GL_DATE,om1_array(j).JE_LINE_NUM,om1_array(j).CODE_COMBINATION_ID,om1_array(j).GL_ABBREV,
om1_array(j).ITEM_ID,om1_array(j).ITEM_DESC, om1_array(j).MEDIA_DESC,
om1_array(j).BRAND_DESC,om1_array(j).AD_CHANNEL_OR_SITE,om1_array(j).AD_TYPE,om1_array(j).SUB_CHANNEL_OR_CATEGORY,
om1_array(j).UOM,om1_array(j).IMPRESSION_CIRCULATION,om1_array(j).GROSS_PRICE_RC,om1_array(j).PROGRAM_PKG,
om1_array(j).BUSINESS_UNIT_DESC,om1_array(j).NET_PRICE_RC);
END LOOP;
END LOOP;
END Pop_Rev_rpt_Detail_Tbl;
Re: ORA-00937:not a single-group group function|ORA-06512:at"schema.procedure name)? [message #251235 is a reply to message #251221] Thu, 12 July 2007 13:24 Go to previous messageGo to next message
BlackSwan
Messages: 25050
Registered: January 2009
Location: SoCal
Senior Member
Nice formating. NOT!
You're On Your Own (YOYO)!
Re: ORA-00937:not a single-group group function|ORA-06512:at"schema.procedure name)? [message #251236 is a reply to message #251221] Thu, 12 July 2007 13:31 Go to previous messageGo to next message
MarcL
Messages: 455
Registered: November 2006
Location: Connecticut, USA
Senior Member
You really expect somebody to try and read through that code ??

Try formatting it and include the error stack.

Also point out the line number in your formatted code to which the error stack is pointing.
Re: ORA-00937:not a single-group group function|ORA-06512:at"schema.procedure name)? [message #251275 is a reply to message #251230] Thu, 12 July 2007 15:19 Go to previous message
joy_division
Messages: 4644
Registered: February 2005
Location: East Coast USA
Senior Member
I see an error in line 184 Wink
Previous Topic: SQL Loader+SQL queries.
Next Topic: Sending line feed/carriage return for email body
Goto Forum:
  


Current Time: Sun Dec 11 04:15:44 CST 2016

Total time taken to generate the page: 0.10710 seconds