| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> SQL*Plus anyone?
Hello everyone
It appears that there is a problem in/with following script;
it just wouldn't compile from SQL prompt, no matter how altered.
Yet it complies fine from PROCEDURE BUILDER 1.5
We have V7.2.3 with PL/SQL 2.2.3
Any suggestions are appreciated and welcomed.
CREATE OR REPLACE PROCEDURE label_run (donor IN varchar2, mail IN varchar2)
IS
BEGIN
DECLARE
v_user varchar2(10);
CURSOR c1 IS SELECT apbcons_addr_name,
spriden_first_name,
spriden_mi,
spriden_last_name,
spraddr_street_line1,
spraddr_street_line2,
spraddr_street_line3,
spraddr_city,
spraddr_stat_code,
spraddr_zip
FROM apbcons, spriden, spraddr,
aprcatg, aprexcl, aprmail,
spbpers, sovgeor
WHERE apbcons_pidm = spriden_pidm
AND apbcons_pidm = spraddr_pidm
AND apbcons_pidm = aprcatg_pidm
AND apbcons_pidm = aprexcl_pidm
AND apbcons_pidm = aprmail_pidm
AND apbcons_pidm = spbpers_pidm
AND apbcons_pidm = sovgeor_pidm
AND lower(spbpers_dead_ind) != 'y'
AND spriden_change_ind IS null;
BEGIN
IF donor = 'ALUM'
AND mail = 'CSI'
THEN
FOR c1rec IN c1 LOOP
INSERT INTO run_label (label_id,
name,
street1,
street2,
street3,
city,
state,
zip,
last_name)
VALUES (v_user,
c1rec.apbcons_addr_name,
c1rec.spraddr_street_line1,
c1rec.spraddr_street_line2,
c1rec.spraddr_street_line3,
c1rec.spraddr_city,
c1rec.spraddr_stat_code,
c1rec.spraddr_zip,
c1rec.spriden_last_name);
--and the errors are:
6/17 PL/SQL: SQL Statement ignored
16/24 PLS-00201: identifier 'ALUMNI.APBCONS' must be declared 36/7 PL/SQL: SQL Statement ignored 46/15 PLS-00364: loop index variable 'C1REC' use is invalidReceived on Tue Dec 03 1996 - 00:00:00 CST
![]() |
![]() |