-
I don't understand
I have created this procedure, bur it returns me an error message :
PLS-00103 : Encountered the symbol "CREATE" when expecting one of the following
: ( ; is with compress compiled wrapped
Does anybody can help me?, I can't find the error. Thanx
Create or replace procedure DTDIP_GENERATOR as
declare dBeginPeriod date;
declare dToday date;
declare cFirstDay char;
BEGIN
/* Inizio calcolo data inizio quindicina in base alla data corrente */
dToday := sysdate;
if day(dToday) <= 15 then
cFirstDay := '01';
else
cFirstDay := '16';
end if;
dBeginPeriod := to_date(cFirstDay || '/' || to_char(month(dtoday)) || '/'
|| to_char(year(dtoday)),'dd/mm/yyyy');
/* Fine calcolo data inizio quindicina in base alla data corrente */
create table DTDIP as
select
/* count(*) as totrec */
T7.PARIVA_CODICE,
T7.OP_SIGLA,
T2.ANPF_COGNOME,
T2.ANPF_NOME,
T7.DIPEND_CESSAZIONE,
T7.OPINAIL_NUM_INTERN
from
anpf_base t2,
dipendenti t7
where
(t7.pariva_codice,
t7.op_sigla,
t7.opinail_num_intern)=(select substr(TABLPARA,1,11) as pariva_codice,
substr(TABLPARA,13,3) as op_sigla,
to_number((substr(TABLPARA,17,2))) as
opinail_num_intern
from dttabd
where TABDCDTB='OSRA' and substr(TABDCDET,1,1)='1')
and
(t7.DIPEND_CESSAZIONE is null or t7.DIPEND_CESSAZIONE >= dBeginPeriod)
and
t2.anpf_codfis=t7.anpf_codfis;
END ;
-
Re: I don't understand
Hi Maurizio,
Are you doing this in the Oracle DBA Studio? If so, I think the CREATE OR
REPLACE bit gets put in for you, so it's duplicated if you put it in as well.
You could try removing the CREATE OR REPLACE bit and see if that makes a
difference.
"Maurizio" <m.gerevasi@tiscalinet.it> wrote:
>
>I have created this procedure, bur it returns me an error message :
>
>PLS-00103 : Encountered the symbol "CREATE" when expecting one of the following
>: ( ; is with compress compiled wrapped
>
>Does anybody can help me?, I can't find the error. Thanx
>
>Create or replace procedure DTDIP_GENERATOR as
> declare dBeginPeriod date;
> declare dToday date;
> declare cFirstDay char;
>BEGIN
>
>/* Inizio calcolo data inizio quindicina in base alla data corrente */
>dToday := sysdate;
>if day(dToday) <= 15 then
> cFirstDay := '01';
>else
> cFirstDay := '16';
>end if;
>dBeginPeriod := to_date(cFirstDay || '/' || to_char(month(dtoday)) || '/'
>|| to_char(year(dtoday)),'dd/mm/yyyy');
>/* Fine calcolo data inizio quindicina in base alla data corrente */
>
>create table DTDIP as
>select
> /* count(*) as totrec */
> T7.PARIVA_CODICE,
> T7.OP_SIGLA,
> T2.ANPF_COGNOME,
> T2.ANPF_NOME,
> T7.DIPEND_CESSAZIONE,
> T7.OPINAIL_NUM_INTERN
>from
> anpf_base t2,
> dipendenti t7
>where
> (t7.pariva_codice,
> t7.op_sigla,
> t7.opinail_num_intern)=(select substr(TABLPARA,1,11) as pariva_codice,
> substr(TABLPARA,13,3) as op_sigla,
> to_number((substr(TABLPARA,17,2))) as
>opinail_num_intern
> from dttabd
> where TABDCDTB='OSRA' and substr(TABDCDET,1,1)='1')
>and
> (t7.DIPEND_CESSAZIONE is null or t7.DIPEND_CESSAZIONE >= dBeginPeriod)
>and
> t2.anpf_codfis=t7.anpf_codfis;
>END ;
>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks