Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Error in RETURNING clause in INSERT.....SELECT query

592700Sep 19 2007 — edited Sep 19 2007
Hi Friends

I am having an error: "SQL stmt not properly ended" when i run the below code.

Cant i fetch multiple values from the returning clause into a collection variable??

insert into consumption__C
(SITECODE, SALESORG, PRODFAM,CAMPCODE, CYEAR, MDATE, SYSENV, MTYPE, ACCOUNT__C, SUPPLIER__C,
PRODUCT_PER_UNIT__C, PRODUCT__C, UNIT__C, AMOUNT_Y__C, VOLUME_Y__C, CURRENCY__C,SUPPLYMODE__C)

select ' ' Sitecode,
' ' Salesorg,
' ' Prodfam,
' ' campcode,
' ' cyear,
pcurr_mig MDATE,
psysenv SYSENV,
'NSet' MTYPE,
c.sitecode Account__c,
' ' supplier__c,
' ' Product_per_unit__c,
c.material Product__c,
' ' unit__c,
c.Amount Amount_y__c,
' ' Volume__c,
'Euro' Currency__c,
' ' Supply_Mode__c

from load_sales_customer_site c returning c.customer_code bulk collect INTO temp;

Kindly guide...... what is the problem!!

Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 17 2007
Added on Sep 19 2007
3 comments
394 views