Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Database > Oracle
|
Oracle General Oracle database discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Oracle section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 19th, 2005, 12:56 AM
Registered User
 
Join Date: Jul 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Functions error compilation

hello,

i typed the following code

SQL> create or replace function first_function return varchar2 as
  2 begin
  3 return 'Hello World';
  4 end first function;
  5 /

but it always gives me the following error

(Warning: Function created with compilation errors.)

so where is the problem and how can i fix it?

 
Old July 20th, 2005, 03:43 AM
_AP _AP is offline
Authorized User
 
Join Date: Jun 2005
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to _AP
Default

SQL> edit
Wrote file afiedt.buf

  1 create or replace function first_function return varchar2 as
  2 begin
  3 return 'Hello World';
  4* end first function;
SQL> /

Warning: Function created with compilation errors.

SQL> show error
Errors for FUNCTION FIRST_FUNCTION:

LINE/COL ERROR
-------- -----------------------------------------------------------------
4/11 PLS-00103: Encountered the symbol "FUNCTION" when expecting one
         of the following:
         ;

SQL> edit
Wrote file afiedt.buf

  1 create or replace function first_function return varchar2 as
  2 begin
  3 return 'Hello World';
  4* end first_function;
SQL> /

Function created.

SQL> select first_function from dual
  2 /

FIRST_FUNCTION
--------------------------------------------------------------------------------
Hello World







Similar Threads
Thread Thread Starter Forum Replies Last Post
Compilation Error furqanms Pro Java 2 September 28th, 2007 11:22 AM
Compilation Error allyant ASP.NET 2.0 Basics 1 August 5th, 2006 05:51 PM
compilation error luizou Classic ASP Components 1 February 10th, 2005 06:25 PM
Compilation Error Ophir Classic ASP Basics 1 June 3rd, 2004 01:05 PM
compilation error saint Classic ASP Databases 2 June 23rd, 2003 04:08 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.