Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> please help me out...

please help me out...

From: Oracle_learner <grad_ra_at_yahoo.com>
Date: 10 May 2003 01:38:11 -0700
Message-ID: <4ca14853.0305100038.524bc920@posting.google.com>


hello people,
I am new to PL/SQL and i have a question. I have a function shipfunct(item_no integer, shiptype char) which is as: create or replace function shipfunct (item_no integer, shiptype char) return number is

        price number;
        itemprice number;
        invalid exception;
begin
        price := 0;
        select lastbid into itemprice from ITEMS where INO=item_no;
        if(shiptype='U') then
              price := itemprice * 0.1; 
        elsif(shiptype='P') then
              price := itemprice * 0.02;
        else raise invalid;
        end if;
        return price;
        exception
                when NO_DATA_FOUND then
raise_application_error(-20010, 'Item number ' ||
                        to_char(item_no) || ' does not exists.');
                when invalid then raise_application_error(-20011,
'SHIPTYPE is invalid.');
end shipfunct;
/
how do i execute this. I say execute shipfunct(179, U). But I get this error:
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'SHIPFUNCT
ORA-06550: line 1, column 7:

PL/SQL: Statement ignored

please help me solve this. I run Oracle 8i on a standalone Windows NT. help truly appreciated.
Oracle_learner. Received on Sat May 10 2003 - 03:38:11 CDT

Original text of this message

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