Hello I have a table named CITY in oracle SQL developer, my problem is how to run the procedure
-- start the script
SET SERVEROUTPUT ON
SET LINESIZE 400
SET TIMING ON
CREATE OR REPLACE PACKAGE BODY hotel AS
-- -----------------------------------------------------
-- Table city
-- -----------------------------------------------------
PROCEDURE fill_city(number_city NUMBER) IS
city VARCHAR2(100);
postna_st VARCHAR2(4);
BEGIN
FOR st IN 1..number_city LOOP
city:= dbms_random.string('a',100);
postal_number:= dbms_random.value(1000,9000);
INSERT INTO CITY(city, postal_number) VALUES (city, postal_number);
END LOOP;
END;
BEGIN
NULL;
END hotel;
/
SHOW ERRORS;
creating the procedure
CREATE OR REPLACE PACKAGE hotel AS
PROCEDURE fill_city(number_city NUMBER)
END hotel;
/
SHOW ERRORS;
and now how to execute the procedure?
--EXECUTE fill_city(10000) ;
Begin
fill_city(10000);
End;
I tried both but with luck.
I recived the following error
Error report:
ORA-06550: line 2, column 2:
PLS-00201: identifier 'fill_city' must be declared
ORA-06550: line 2, column 2:
PL/SQL: Statement ignored
06550. 00000 - "line %s, column %s:\n%s"
*Cause: Usually a PL/SQL compilation error.
*Action:
Elapsed: 00:00:00.018