procedure doesnt like the parameters passed into it
HI Ive created a package + body the following procedure has an OUT, IN,IN declaration at the top of the procedure, Ive tried running the script and it keeps throwing the error below, its something really easy but at the mo cant see the wood for the trees. thanks in advance for any help.
SQL> execute ManageHotel.AddGuest ('null', 'John Poulton', 'Wrexham')
BEGIN ManageHotel.AddGuest ('John Poulton', 'Wrexham'); END;
*
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'ADDGUEST'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
-- AddGuest adds the given guest to the guest table
PROCEDURE AddGuest(out_guest_no OUT Guest.Guest_no%TYPE,
in_guest_name IN Guest.name%TYPE,
in_guest_address IN Guest.address%TYPE)
IS
v_Count INT;
BEGIN
-- Check to see if guests exists with the name and address
-- Use UPPER to ignore case settings in queries or data
SELECT COUNT(*) INTO v_Count
FROM Guest
WHERE UPPER(NAME) = UPPER(in_guest_name)
AND UPPER(Address) = UPPER(in_guest_address);
-- If this guest does not existcreate and entry and commit
IF (v_Count = 0) THEN
--create a new guest number
SELECT MAX(GUEST_NO)+1 INTO out_guest_no
FROM GUEST;
-- Now create the new record and commit it to the database
INSERT INTO Guest(GUEST_NO, NAME, ADDRESS)
VALUES (out_guest_no, in_guest_name, in_guest_address);
COMMIT;
DBMS_OUTPUT.PUT_LINE('New guest record inserted');
ELSE
-- Guest already exists guest number is returned
SELECT GUEST_NO INTO out_guest_no
FROM Guest
WHERE UPPER(NAME) = UPPER(in_guest_name)
AND UPPER(Address) = UPPER(in_guest_address);
END IF;
END AddGuest;