Re: Seperate two procedures
From: DA Morgan <damorgan_at_psoug.org>
Date: Mon, 12 Jun 2006 13:33:30 -0700
Message-ID: <1150144413.365810_at_bubbleator.drizzle.com>
>
> I am using oracle 8i and we do not use bulk collection. I do not have
> any errors - I just want to seperate the two in one procedures. If I
> try to seperate RecordHole procedure:
>
> CREATE OR REPLACE procedure RecordHole( ir_row
> lc_GabrielAiring%rowtype, in_prgId number, ir_lastRow
> lc_GabrielAiring%rowtype, ic_type varchar2 ) is
> lc_insertText varchar2(20);
> ln_firstTime number;
> ln_lastTime number;
> begin
> if ic_type = 'H' then
> lc_insertText := 'Hole ';
> ln_firstTime := ir_lastRow.start_dttm - ir_row.bday;
> ln_lastTime := ir_lastRow.end_dttm - ir_row.bday;
> else
> lc_insertText := 'Ovlp ';
> ln_firstTime := ir_lastRow.start_dttm - ir_row.bday;
> ln_lastTime := ir_lastRow.end_dttm - ir_row.bday;
> end if;
>
> RecordScheduleAnomoly(ir_row.bday
> ,ir_lastRow.start_dttm - ir_row.bday
> ,ir_lastRow.end_dttm - ir_row.bday
> ,null
> ,ir_lastRow.sell_id
> ,in_prgId
> ,lc_insertText
> ||'('
> ||ir_lastRow.group_title
> ||' ends at '
> ||to_char( ir_lastRow.end_dttm, 'hh24:mi' )
> ||')'
> ,' ('
> ||ir_row.group_title
> ||' starts at '
> ||to_char( ir_row.start_dttm, 'hh24:mi' )
> ||').'
> );
> ln_holeCount := ln_holeCount + 1;
> end;
>
> Then I get PLS-00201: identifier 'LC_GABRIELAIRING' must be declared is
> there a way around this?
> Thanks,
>
> Joe
Date: Mon, 12 Jun 2006 13:33:30 -0700
Message-ID: <1150144413.365810_at_bubbleator.drizzle.com>
Joe wrote:
> DA Morgan wrote:
>> Looking at your code there are a number of things I could take issue >> with such as why you are using a cursor loop rather than a bulk >> collection. >> >> But given that you've provided no version number and no error message >> how do you expect anyone to know what isn't working? >> -- >> Daniel A. Morgan >> University of Washington >> damorgan_at_x.washington.edu >> (replace x with u to respond) >> Puget Sound Oracle Users Group >> www.psoug.org
>
> I am using oracle 8i and we do not use bulk collection. I do not have
> any errors - I just want to seperate the two in one procedures. If I
> try to seperate RecordHole procedure:
>
> CREATE OR REPLACE procedure RecordHole( ir_row
> lc_GabrielAiring%rowtype, in_prgId number, ir_lastRow
> lc_GabrielAiring%rowtype, ic_type varchar2 ) is
> lc_insertText varchar2(20);
> ln_firstTime number;
> ln_lastTime number;
> begin
> if ic_type = 'H' then
> lc_insertText := 'Hole ';
> ln_firstTime := ir_lastRow.start_dttm - ir_row.bday;
> ln_lastTime := ir_lastRow.end_dttm - ir_row.bday;
> else
> lc_insertText := 'Ovlp ';
> ln_firstTime := ir_lastRow.start_dttm - ir_row.bday;
> ln_lastTime := ir_lastRow.end_dttm - ir_row.bday;
> end if;
>
> RecordScheduleAnomoly(ir_row.bday
> ,ir_lastRow.start_dttm - ir_row.bday
> ,ir_lastRow.end_dttm - ir_row.bday
> ,null
> ,ir_lastRow.sell_id
> ,in_prgId
> ,lc_insertText
> ||'('
> ||ir_lastRow.group_title
> ||' ends at '
> ||to_char( ir_lastRow.end_dttm, 'hh24:mi' )
> ||')'
> ,' ('
> ||ir_row.group_title
> ||' starts at '
> ||to_char( ir_row.start_dttm, 'hh24:mi' )
> ||').'
> );
> ln_holeCount := ln_holeCount + 1;
> end;
>
> Then I get PLS-00201: identifier 'LC_GABRIELAIRING' must be declared is
> there a way around this?
> Thanks,
>
> Joe
And a perfectly reasonable error it would seem. Your PL/SQL procedure, can not see the table LC_GABRIELAIRING. Which pretty clearly indicates that the name is misspelled or in a different schema and you have not been granted explicit access to reference it.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Mon Jun 12 2006 - 22:33:30 CEST