Re: problem with pl/sql



On Mar 13, 11:25 am, DA Morgan <damor...@xxxxxxxxx> wrote:
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 enginehttp://tahiti.oracle.comand read the docs. Go to Morgan's
Library atwww.psoug.organd 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
damor...@xxxxxxxxxxxxxxxx
(replace x with u to respond)
Puget Sound Oracle Users Groupwww.psoug.org- Hide quoted text -

- Show quoted text -

I would say this is a tool/language/interface problem rather than a pl/
sql language problem since the posted code is perfectly valid and runs
successfully on my 9.2.0.6 version via SQLPlus

UT1 > set echo on
UT1 > get t22
1 declare
2 a number := 2;
3 begin
4 a := a + 1;
5* end;
UT1 > /

PL/SQL procedure successfully completed.

UT1 > run
1 declare
2 a number := 2;
3 begin
4 a := a + 1;
5* end;

PL/SQL procedure successfully completed.

From the error messages I suspect that this is imbedded pl/sql from a
pro* language or being passed through via ODBC.

HTH -- Mark D Powell --

.



Relevant Pages

  • Re: Limit of 1050 columns for ANSI joins
    ... comprehensive than Oracle SQL. ... I'm trying not to have any auto-generated SQL on my system, ... Index your schema properly and think about the proper design. ...
    (comp.databases.oracle.server)
  • Re: I cant find a SETUP.EXE in the SQL Plus Client ??
    ... someone else's server for testing some SELECT statements I'm ... free client because I don't own the Oracle license. ... SQL statements. ... There is no documentation with that download. ...
    (comp.databases.oracle.tools)
  • Re: How to convince my customer to use SQL2005 instaed of Oracle10g
    ... the old Sql versus Oracle debate. ... If I were you I would focus one SQL Server 2005 clearest advantages ... You mentioned Availability, so I assume your looking into HA (high ...
    (microsoft.public.sqlserver)
  • Re: How to convince my customer to use SQL2005 instaed of Oracle10g
    ... migration to Sql 2005 would be direct & straight forward, quick, and ... If I were you I would focus one SQL Server 2005 clearest advantages ... would need a 4 processor license but for Oracle you would need a 16 ... You mentioned Availability, so I assume your looking into HA (high ...
    (microsoft.public.sqlserver)
  • Re: SQL Server 2005 vs Oracle
    ... SQL and Oracle. ... SQL Server one sizes log files to handle the largest transaction and its ...
    (comp.databases.ms-sqlserver)