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

Home -> Community -> Usenet -> c.d.o.tools -> Trigger help for Oracel newbie

Trigger help for Oracel newbie

From: Robert Brown <rob_99_at_my-deja.com>
Date: Thu, 28 Sep 2000 15:29:16 GMT
Message-ID: <8qvo40$6ei$1@nnrp1.deja.com>

Hi,

I've been using Sybase for a few years and now I'm working on Oracle, so I need some help with translation.

In particular, the following Create Trigger is giving me 'MGR-00072: Warning: TRIGGER SGUS_CUSIP_TO_TICKETNO created with compilation errors. ' error message:

CREATE OR REPLACE TRIGGER sgus_cusip_to_ticketno BEFORE INSERT OR UPDATE OF ticket_no ON deals FOR EACH ROW
BEGIN

	UPDATE :new
	SET ticket_no = (	SELECT secissue.cusip
				FROM secissue
				WHERE secissue.thekey = :new.secissue)
END; I then ran:
select Line, Position, Text from user_errors where Name = 'SGUS_CUSIP_TO_TICKETNO'

... which gives me:
LINE POSITION
TEXT

   (

         6 1 PLS-00103: Encountered the symbol "END" when expecting one of the following:

3 rows selected.

I must admit I'm pretty lost - I thought :new was the correct way of addressing the row about to be inserted or updated? That 'expected one of the following:' is odd. What following?

Any help would be most appreciated,

Rob
p.s. is there an Oracle equivelent of Sybases 'sp_help'? p.p.s. is there any 'Oracle for Sybase users' resource out there?

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Thu Sep 28 2000 - 10:29:16 CDT

Original text of this message

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