I am trying to perform an action a forms field after an insert or update, depending on the situation.
I have this code that is not working.
Can anyone please look into this for me?
I assumed it to be a pre-insert/pre-update trigger.
My other problem with this code is understanding how to replace the word nextfield. It is just a pseudocode.
thanks for your help.
zik
create or replace trigger field_name
declare
j char(1);
c char(1);
s char(1);
pname varchar2(20);
cont varchar2(20);
k char(1);
begin
if ( ( j='A' ) or ( j='B' ) or ( j='X' ) )
then
begin
if ((c=' ') or (s= ' ') or (cont=' ') or = ' '))
then
begin
nextfield = 'ag'
dbms_output.put_line('Age or Age Code, Sex,
Patient Name, and Content must be entered');
end;
else
nextfield = 'r'
end
else
if ( ( k='A' ) or ( k='B' ) )
then
begin
if ((c=' ') or (s=' ') or (cont=' ') )then
begin
nextfield = 'ag'
dbms_output.put_line('Age or Age Code, Sex,
and Content must be entered');
end'
else
nextfield = 'r'
end;
else
nextfield = 'r'
end if;
I have this code that is not working.
Can anyone please look into this for me?
I assumed it to be a pre-insert/pre-update trigger.
My other problem with this code is understanding how to replace the word nextfield. It is just a pseudocode.
thanks for your help.
zik
create or replace trigger field_name
declare
j char(1);
c char(1);
s char(1);
pname varchar2(20);
cont varchar2(20);
k char(1);
begin
if ( ( j='A' ) or ( j='B' ) or ( j='X' ) )
then
begin
if ((c=' ') or (s= ' ') or (cont=' ') or = ' '))
then
begin
nextfield = 'ag'
dbms_output.put_line('Age or Age Code, Sex,
Patient Name, and Content must be entered');
end;
else
nextfield = 'r'
end
else
if ( ( k='A' ) or ( k='B' ) )
then
begin
if ((c=' ') or (s=' ') or (cont=' ') )then
begin
nextfield = 'ag'
dbms_output.put_line('Age or Age Code, Sex,
and Content must be entered');
end'
else
nextfield = 'r'
end;
else
nextfield = 'r'
end if;