Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: INSERT INTO...RETURNING doesn't work ( ORA-00933)

Re: INSERT INTO...RETURNING doesn't work ( ORA-00933)

From: Lewis C <lewisc_at_excite.com>
Date: Mon, 11 Apr 2005 00:02:52 GMT
Message-ID: <3hfj51t53snrs82772g446r27dtauaoi56@4ax.com>


On Sun, 10 Apr 2005 23:49:32 GMT, Lewis C <lewisc_at_excite.com> wrote:

>On 10 Apr 2005 15:37:30 -0700, agonenil_at_gmail.com wrote:
>
>>hi , i get the following problem :
>>
>>SQL> Variable tot_sal number;
>>SQL> begin
>> 3 INSERT INTO emp select * from emp
>> 5 RETURNING sum(sal) INTO :tot_sal;
>> 7 dbms_output.put_line('Total Company Payroll now : ' ||
>>to_char(:tot_sal,'$9
>>99,999.00'));
>> 9 end;
>> 11 /
>>RETURNING sum(sal) INTO :tot_sal;
>> *
>>ERROR at line 5:
>>ORA-06550: line 5, column 11:
>>PL/SQL: ORA-00933: SQL command not properly ended
>>ORA-06550: line 3, column 1:
>>PL/SQL: SQL Statement ignored
>>
>>altough accrding to http://www.remote-dba.cc/10g_65.htm , it should
>>work.
>>

A link to a question on asktom that I think pertains to this discussion. The entire thread is worth reading but search on "returning thing I inserted", no quotes, for a direct answer.

Interesting issue.

Lewis



Lewis R Cunningham

Author, ItToolBox Blog: An Expert's Guide to Oracle http://blogs.ittoolbox.com/oracle/guide/

Topic Editor, Suite101.com: Oracle Database http://www.suite101.com/welcome.cfm/oracle

Sign up for courses here:
http://www.suite101.com/suiteu/default.cfm/416752


Received on Sun Apr 10 2005 - 19:02:52 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US