Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trigger not working

Status
Not open for further replies.

zik

Technical User
Jan 23, 2006
28
HR
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;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top