Re: PL/SQL Procedure Problem

From: Sybrand Bakker <gooiditweg_at_nospam.demon.nl>
Date: Wed, 15 Oct 2003 13:46:48 +0200
Message-ID: <tocqovk8s4eldbim81h76e6ij83k9pbpfn_at_4ax.com>


[Quoted] On Wed, 15 Oct 2003 11:16:38 +0000 (UTC), "Jimbo" <Jimbo_at_yahoo.com> wrote:

>Hi there, I'm new to PL/SQL and have been given the following procedure:
>
>create or replace procedure otime (hoursworked number) as
>overtimehours number;
>normalhours number;
>message varchar2(30);
>begin
>normalhours := 35;
>if hoursworked > normalhours then
>overtimehours := hoursworked - normalhours;
>message := 'Overtime Hours worked = ';
>dbms_output.put_line(message);
>dbms_output.put_line(overtimehours);
>else
>message := 'No Overtime!';
>dbms_output.put_line(message);
>end if;
>end;
>
>but when I EXECUTE this, I get an error and I think it is referring to the
>datatype(number) after 'hoursworked' in the 1st line. Could someone give me
>some help on this please?
>
>Also, how would I get the data from a column called hours in a table called
>EMP, when using a procedure?
>
>Many thanks,
>James
>
>
>
If you are also new to this newsgroup, you are advised always to include *at least*
- The exact error message
[Quoted] - The version and O/S of Oracle you are using. The procedure seems to compile, your reference to the way you are executing it is so vague, one needs to resort to a crystall ball. They have been sold out long since

--
Sybrand Bakker, Senior Oracle DBA
Received on Wed Oct 15 2003 - 13:46:48 CEST

Original text of this message