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: why my dynamic sql statement failed?

Re: why my dynamic sql statement failed?

From: <zlmei_at_hotmail.com>
Date: 15 Feb 2006 19:24:03 -0800
Message-ID: <1140060243.075180.169090@g14g2000cwa.googlegroups.com>


Did the row gets inserted into the table after you ran that pl/sql block? What is the result of

select count(*) from dept
where deptno=99
and dname='sample';

? I assume you would see 1 in your case?

Guang

> nope.
> there's no restriction on literal newlines in a string literal, nor required
> spacing between tokens:
>
> SQL> begin
> 2 execute immediate'insert into dept(deptno,dname)
> 3 values(99,''sample'')
> 4 ';
> 5 end;
> 6 /
>
> PL/SQL procedure successfully completed.
>
> OP's error seems to be a logic error -- it compiles, it ran, it gave
> results, but results were incorrect
>
> ++ mcs
Received on Wed Feb 15 2006 - 21:24:03 CST

Original text of this message

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