Re: problem with pl/sql



news.atom.pl wrote:
hello, i'm new in pl/sql i have problem with basic command like:

declare
a number := 2;
begin
a := a + 1;
end;
.
run;

becouse database show me:


Executing:

end

ORA-00900: invalid SQL statement
[Error Code: 900]
[SQL State: 42000]


Executing:

.
run

ORA-00900: invalid SQL statement
[Error Code: 900]
[SQL State: 42000]


what is wrong, could enybody explain where is problem.

thanks in advantige.
sw

Oracle is NOT SQL Server. Where did you get the syntax

> .
> run;

It sure wasn't from any Oracle related document. Get a copy
of some Oracle books and read them. Visit Oracle's search engine
http://tahiti.oracle.com and read the docs. Go to Morgan's
Library at www.psoug.org and look at the demos.

SQL*Plus: Release 10.2.0.2.0 - Production on Tue Mar 13 08:22:40 2007

Copyright (c) 1982, 2005, Oracle. All Rights Reserved.


Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
With the Partitioning, OLAP and Data Mining options

SQL> declare
2 a number := 2;
3 begin
4 a := a + 1;
5 end;
6 /

PL/SQL procedure successfully completed.

SQL>

Every time you try to pretend Oracle is some other product is time wasted.
--
Daniel A. Morgan
University of Washington
damorgan@xxxxxxxxxxxxxxxx
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
.



Relevant Pages

  • Re: desc: invalid sql statement
    ... It is not part of the Oracle SQL language. ... Subject: desc: invalid sql statement ... I believe a describe statement is Oracle DDL, but I still failed for both of the ways that I know of to execute sql. ...
    (perl.dbi.users)
  • Re: problem with pl/sql
    ... becouse database show me: ... ORA-00900: invalid SQL statement ... [Error Code: 900] ... [SQL State: 42000] ...
    (comp.databases.oracle.misc)
  • problem with pl/sql
    ... becouse database show me: ... ORA-00900: invalid SQL statement ... [Error Code: 900] ... [SQL State: 42000] ...
    (comp.databases.oracle.misc)
  • using EXECUTE IMMEDIATE to run DBMS_STATS.GATHER_SCHEMA_STATS
    ... When I run the block below, in oracle 10.2.0.3.0, I get the error ... Is this a problem with my coding or is it just not ... EXECUTE IMMEDIATE v_dbms_stats; ... ORA-00900: invalid SQL statement ...
    (comp.databases.oracle.misc)
  • Re: problem with pl/sql
    ... [Error Code: 900] ... [SQL State: 42000] ... It sure wasn't from any Oracle related document. ...
    (comp.databases.oracle.misc)