Home » RDBMS Server » Server Administration » Triggers
Triggers [message #52731] Thu, 08 August 2002 22:56 Go to next message
Lars Carlsson
Messages: 1
Registered: August 2002
Junior Member
I've made a trigger (below) that works perfectly on Oracle versjon 8.1.7.0.0 on NT, but some of the statements doesn't work on Oracle versjon 8.1.7.0.0 on Unix. Why? It is the two select statements that doesn't work on Unix. Can anybody help me?

CREATE OR REPLACE TRIGGER lpdba.IMX_stillinger
after
insert or update OF O5HJEMNR, O5ORGID,O5STILL,O5HJTYPE, O5PROSAN
ON lpdba.O5HJEML
for each row
declare
BRUKERNR LPDBA.IMP_STILLING.BRUKERNR%TYPE;
STILLINGSID LPDBA.IMP_STILLING.STILLINGSID%TYPE;
DATO LPDBA.IMP_STILLING.DATO%TYPE;
KL LPDBA.IMP_STILLING.KL%TYPE;
STILLINGSBESKRIVELSE LPDBA.IMP_STILLING.STILLINGSBESKRIVELSE%TYPE;
STILLINGSKODE LPDBA.IMP_STILLING.STILLINGSKODE%TYPE;
ORGENHETID LPDBA.IMP_STILLING.ORGENHETID%TYPE;
BUDSTILLINGPROS LPDBA.IMP_STILLING.BUDSTILLINGPROS%TYPE;
ARBTIDGRUPPE LPDBA.IMP_STILLING.ARBTIDGRUPPE%TYPE;

BEGIN

Select t16kode2 into ARBTIDGRUPPE from t16kode
where t16adm = :new.o5adm and t16kode = :new.o5hjtype and t16ktype = 'HJTYPE';

Select distinct t6beteg into STILLINGSBESKRIVELSE from t6still where t6adm = :new.o5adm and t6still = :new.o5still;

insert into lpdba.IMP_STILLING (BRUKERNR,STILLINGSID,DATO,KL,STILLINGSKODE,ORGENHETID,
BUDSTILLINGPROS,STILLINGSBESKRIVELSE,ARBTIDGRUPPE)
values(:new.O5ADM,:new.O5HJEMNR,to_char(sysdate,'YYYYMMDD'),to_char(sysdate,'HH24MISS'),
:new.O5STILL,:new.O5ORGID,:new.O5PROSAN,STILLINGSBESKRIVELSE,ARBTIDGRUPPE);

END;
Re: Triggers [message #52735 is a reply to message #52731] Fri, 09 August 2002 05:41 Go to previous messageGo to next message
Mahesh Rajendran
Messages: 10707
Registered: March 2002
Location: oracleDocoVille
Senior Member
Account Moderator
wat is the error u encounter?
Re: Triggers [message #52737 is a reply to message #52731] Fri, 09 August 2002 06:16 Go to previous message
saleem
Messages: 65
Registered: January 2002
Member
sql statments work independant of operating systems. it's more than likely that the statement is not working because the schema's are not the same on your unix and nt boxes.
Previous Topic: Re: Oracle9i database version
Next Topic: Checkpoint
Goto Forum:
  


Current Time: Thu Sep 19 13:27:19 CDT 2024