Skip to Main Content

Español

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Trigger

415ece1e-3bed-441a-898c-93950f9c712fDec 18 2019 — edited Dec 19 2019

Hola, tengo que hacer un Trigger para conseguir que "Las citas a una publicación deben ser siempre posteriores a ella", osea que una publicación_citada el año de codigo_publicacion sea mayor que el de codigo_publicacion_citada. Tengo este esquema de tablas y que no puedo modificar:

PUBLICACION(codigo_publicacion, titulo, año, tipo, medio)

AUTOR (login, nombre, apellidos, institución, pais)

AUTORIA (login, codigo_publicacion)

PUBLICACION_CITADA (codigo_publicacion, codigo_publicacion_citada)

Y no se como hacer un trigger que me funcione relacionando las dos tablas, básicamente tengo esto que adjunto

Create or replace trigger works_trg_01

Before insert or update on pubred

For each row

Declare

Cnt number;

Begin

Select count(1) into cnt

from pubred, pub_cita

where :new.cod_pub != cod_pub

And case when :new.año = año  then 1

Else 0 end = 0;

If cnt <> 0 then

Raise_application_error('-20001', 'Citas deben ser posteriores');

End if;

End works_trg_01;

/

Comments

Hi Roland,

I guess this is due to the fact you are using -H option instead of -h.  -H is useful to address issues related to multiple network interface support.

Try -h

-Sylvain

------

When closing a thread as answered remember to mark the correct and helpful posts to make it easier for others to find them

rsc-ffm

Hi Sylvain,

I tried it with both versions and both failed.

Roland

bhadra12
Answer

Hi Ronald,

It must work with -h option. -H is the hostname used by the dscc registry to connect the agent. That means localhost in this case.

Did you check the status of DSCC agent on the second server? (agent which you are trying to add)

# /opt/dsee7/bin/dsccagent info

-Bhadra

Marked as Answer by rsc-ffm · Sep 27 2020
rsc-ffm

Hi,

I got this answer also on a case, that I've opened!

Thanks,

Roland

1 - 4

Post Details

Added on Dec 18 2019
2 comments
319 views