Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Need help with SQL Worksheet

Re: Need help with SQL Worksheet

From: <alex_n_at_my-dejanews.com>
Date: Fri, 24 Jul 1998 09:55:46 GMT
Message-ID: <6p9ln1$amp$1@nnrp1.dejanews.com>


Hi,
try to put slash after each begin-end block like this: /* My Function */
CREATE OR REPLACE FUNCTION "S_USERACCESSDM".NEWDEPID ...
BEGIN
...
END ;
/

/* My Trigger */
CREATE OR REPLACE TRIGGER "S_USERACCESSDM".Department_Bit ...
BEGIN
...
END ;
/

In article <35b5a409.0_at_204.239.181.11>,   "Eric Jodoin" <ejodoin_at_inetex.com> wrote:
> Hi,
>
> I have the following code in a SQL file. If I open it and try to run it I
> get:
>
> MGR-00073: Warning: FUNCTION .s_useraccessdm created with compilation
> errors.
>
> It looks like the Create Function and Create trigger mix together instead of
> being 2 independent command.
>
> I know I have to be missing something between those 2 but I look through all
> my books and I just can't figure it out. Here is the code i used:
>
> /* My Function */
> CREATE OR REPLACE FUNCTION "S_USERACCESSDM".NEWDEPID
> RETURN INTEGER IS
> NEW_ID INTEGER ;
> BEGIN
> Select DEPTID_SEQ.nextval into NEW_ID from dual ;
> RETURN(NEW_ID) ;
> END ;
>
> /* My Trigger */
> CREATE OR REPLACE TRIGGER "S_USERACCESSDM".Department_Bit
> BEFORE INSERT ON "S_USERACCESSDM"."DEPARTMENT"
> FOR EACH ROW
> BEGIN
> IF (:new.DEPTID IS NULL) THEN
> select DEPTID_SEQ.nextval
> into :new.DEPTID
> from Dual;
> END IF;
> END ;
>
> Thanks for your help.
>
>

-----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Fri Jul 24 1998 - 04:55:46 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US